2 include $(TOP)/config/make.cfg
6 aros/preprocessor/facilities \
7 aros/preprocessor/variadic \
41 INCLUDES := $(foreach d,$(INCSUBDIRS),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)) $(wildcard *.h)
42 ARCHINCDIR := $(SRCDIR)/arch/$(CPU)-$(ARCH)/include/
43 ARCH_INCLUDES := $(subst $(ARCHINCDIR),,$(foreach d,$(addprefix $(ARCHINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
44 INCLUDES := $(filter-out $(ARCH_INCLUDES),$(INCLUDES))
45 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
46 GEN_INCLUDES := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
47 INCL_DIRS := $(foreach dir,$(INCSUBDIRS),$(AROS_INCLUDES)/$(dir)) \
48 $(foreach dir,$(INCSUBDIRS),$(GENINCDIR)/$(dir))
50 #MM- includes : includes-generate
51 #MM- includes-generate : includes-generate-deps
52 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU)
53 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU)
55 #MM- includes-$(ARCH)-$(CPU) : \
56 #MM includes-copy-$(ARCH)-$(CPU) \
57 #MM includes-generate-$(ARCH)-$(CPU)
58 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
59 #MM- includes-copy-$(ARCH)-$(CPU) :
62 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES)
64 $(AROS_INCLUDES)/%.h : %.h
65 @$(ECHO) "Copying C includes to $(AROS_INCLUDES)..."
68 $(GENINCDIR)/%.h : %.h
69 @$(ECHO) "Copying C includes to $(GENINCDIR)..."
72 $(AROS_INCLUDES)/%.hpp : %.hpp
73 @$(ECHO) "Copying C++ includes to $(AROS_INCLUDES)..."
76 $(GENINCDIR)/%.hpp : %.hpp
77 @$(ECHO) "Copying C++ includes to $(GENINCDIR)..."
83 @$(ECHO) "Creating $@..."
87 includes-asm_h-$(CPU) : $(GENINCDIR)/aros/$(CPU)/asm.h
89 .PHONY : includes-asm_h-$(CPU)
91 $(OBJDIR)/asm.s : asm.c | $(OBJDIR)
92 @$(ECHO) "Compiling $<..."
93 @$(TARGET_CC) $(TARGET_SYSROOT) $(CFLAGS) $(PRIV_EXEC_INCLUDES) $(PRIV_KERNEL_INCLUDES) -S $< -o $@
95 $(GENINCDIR)/aros/$(CPU)/asm.h : $(OBJDIR)/asm.s | $(GENINCDIR)/aros/$(AROS_TARGET_CPU)
96 @$(ECHO) Generating $@...
97 @grep "^[/#][*d]" $< | sed s/[$$]//g >$@
102 $(GENINCDIR)/aros/$(CPU) :
107 -$(RM) $(AROS_INCLUDES) $(GENINCDIR)