Updated PCI IDs to latest snapshot.
[tangerine.git] / compiler / clib / stubs / mmakefile.src
blob950273730d93ad8621ca8b2dc36f25ce1d91bd3e
1 # $Id$
2 include $(TOP)/config/make.cfg
4 STUBSDIR        := $(GENDIR)/compiler/clib/stubs
5 FILES           := $(shell ($(ECHO) '\#define SYSTEM_CALL(x, y...) x'; $(CAT) $(AROS_INCLUDES)/sys/syscall.def) | $(CPP) -P -)
6 FILES           := $(addprefix $(STUBSDIR)/,$(FILES))
7 OBJS            := $(addsuffix .o,$(FILES))
8 STUBS           := $(addsuffix .S,$(FILES))
9 GENSTUBS        := genstubs
11 #MM
12 clib-stubs : $(OBJS)
14 #MM
15 clib-stubs-clean : clean
17 #MM
18 clean ::
19         -$(RM) $(STUBSDIR)
21 $(OBJS) $(STUBS) : | $(STUBSDIR)
22 %rule_makedirs dirs=$(STUBSDIR)
24 $(OBJS) : $(STUBSDIR)/%.o : $(STUBSDIR)/%.S
25         %assemble_q
27 $(STUBSDIR)/%.S: $(STUBSDIR)/$(GENSTUBS)
28         @$(ECHO) Generating stub function for \'$$(basename $(notdir $@))\'...
29         @$(STUBSDIR)/$(GENSTUBS) $(basename $(notdir $@)) >$@
31 $(STUBSDIR)/$(GENSTUBS) : $(GENSTUBS).c $(AROS_INCLUDES)/sys/syscall.def \
32     $(AROS_INCLUDES)/aros/cpu.h $(STUBSDIR)/archspecific.h
33         @$(HOST_CC) $(HOST_CFLAGS) -I$(GENINCDIR) -I$(STUBSDIR) $< -o $@
35 $(STUBSDIR)/archspecific.h: archspecific.c $(GENINCDIR)/aros/$(AROS_TARGET_CPU)/cpu.h | $(STUBSDIR)
36         @$(TARGET_CC) -S $< -o $(STUBSDIR)/archspecific.s
37         @grep "^[/#][*d]" $(STUBSDIR)/archspecific.s | $(SED) s/@SED@[$$]*//g >$@
38         @$(RM) $(STUBSDIR)/archspecific.s