3 include $(SRCDIR)/config/aros.cfg
7 aros/preprocessor/facilities \
8 aros/preprocessor/variadic \
42 # clib & proto are handled above.
43 INCEMPTYDIRS := defines \
46 INCLUDES := $(foreach d,$(INCSUBDIRS),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)) $(wildcard *.h)
47 ARCHINCDIR := $(SRCDIR)/arch/$(CPU)-$(ARCH)/include/
48 ARCH_INCLUDES := $(subst $(ARCHINCDIR),,$(foreach d,$(addprefix $(ARCHINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
49 INCLUDES := $(filter-out $(ARCH_INCLUDES),$(INCLUDES))
50 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
51 GEN_INCLUDES := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
52 INCL_DIRS := $(foreach dir,$(INCSUBDIRS) $(INCEMPTYDIRS),$(AROS_INCLUDES)/$(dir)) \
53 $(foreach dir,$(INCSUBDIRS) $(INCEMPTYDIRS),$(GENINCDIR)/$(dir))
55 #MM- includes : includes-generate
56 #MM- includes-generate : includes-generate-deps
57 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU)
58 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU)
60 #MM- includes-$(ARCH)-$(CPU) : \
61 #MM includes-copy-$(ARCH)-$(CPU) \
62 #MM includes-generate-$(ARCH)-$(CPU)
63 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
64 #MM- includes-copy-$(ARCH)-$(CPU) :
67 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES)
69 $(AROS_INCLUDES)/%.h : %.h
70 @$(ECHO) "Copying C includes to $(AROS_INCLUDES)..."
73 $(GENINCDIR)/%.h : %.h
74 @$(ECHO) "Copying C includes to $(GENINCDIR)..."
77 $(AROS_INCLUDES)/%.hpp : %.hpp
78 @$(ECHO) "Copying C++ includes to $(AROS_INCLUDES)..."
81 $(GENINCDIR)/%.hpp : %.hpp
82 @$(ECHO) "Copying C++ includes to $(GENINCDIR)..."
88 @$(ECHO) "Creating $@..."
92 includes-asm_h-$(CPU) : $(GENINCDIR)/aros/$(CPU)/asm.h
94 .PHONY : includes-asm_h-$(CPU)
96 $(OBJDIR)/asm.s : asm.c | $(OBJDIR)
97 @$(ECHO) "Compiling $<..."
98 @$(TARGET_CC) $(TARGET_SYSROOT) $(CFLAGS) $(PRIV_EXEC_INCLUDES) $(PRIV_KERNEL_INCLUDES) -S $< -o $@
100 $(GENINCDIR)/aros/$(CPU)/asm.h : $(OBJDIR)/asm.s | $(GENINCDIR)/aros/$(AROS_TARGET_CPU)
101 @$(ECHO) Generating $@...
102 @grep "^[/#][*d]" $< | sed s/[$$]//g >$@
107 $(GENINCDIR)/aros/$(CPU) :
112 -$(RM) $(AROS_INCLUDES) $(GENINCDIR)