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))
15 clib-stubs-clean : clean
21 $(OBJS) $(STUBS) : | $(STUBSDIR)
22 %rule_makedirs dirs=$(STUBSDIR)
24 $(OBJS) : $(STUBSDIR)/%.o : $(STUBSDIR)/%.S
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