3 include $(SRCDIR)/config/aros.cfg
4 include $(TOP)/$(CURDIR)/geninc.cfg
8 aros/preprocessor/variadic \
9 aros/preprocessor/array \
45 # clib & proto are handled above.
46 #INCEMPTYDIRS := defines \
49 INCLUDES_BASE := $(foreach d,$(addprefix $(SRCDIR)/$(CURDIR)/,$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)) $(wildcard *.h)
50 INCLUDES := $(subst $(SRCDIR)/$(CURDIR)/,,$(INCLUDES_BASE))
51 ARCHINCDIR := $(SRCDIR)/arch/$(CPU)-$(ARCH)/include/
52 ARCH_INCLUDES := $(subst $(ARCHINCDIR),,$(foreach d,$(addprefix $(ARCHINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
53 INCLUDES := $(filter-out $(ARCH_INCLUDES),$(INCLUDES))
54 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
55 GEN_INCLUDES := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
56 INCL_DIRS := $(foreach dir,$(INCSUBDIRS) $(INCEMPTYDIRS),$(AROS_INCLUDES)/$(dir)) \
57 $(foreach dir,$(INCSUBDIRS) $(INCEMPTYDIRS),$(GENINCDIR)/$(dir))
59 #MM- includes : includes-generate
60 #MM- includes-generate : includes-generate-deps
61 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU)
62 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU)
64 #MM- includes-$(ARCH)-$(CPU) : \
65 #MM includes-copy-$(ARCH)-$(CPU) \
66 #MM includes-generate-$(ARCH)-$(CPU)
67 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
68 #MM- includes-copy-$(ARCH)-$(CPU) :
71 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES) includes-execbase_h
73 # execbase is copied seperately, since on SMP builds we need to
76 $(GENINCDIR)/exec/execbase.h : $(SRCDIR)/$(CURDIR)/exec/execbase.inc
77 @$(ECHO) "Copying C includes to $(GENINCDIR)..."
79 ifneq ($(strip $(EXECSMP)),"")
80 $(SED) -i -e 's/.*ThisTask;.*/ IPTR SMPPrivate1;/' -e 's/.*Quantum;.*/ WORD SMPPrivate2;/' -e 's/.*Elapsed;.*/ WORD SMPPrivate3;/' -e 's/.*IDNestCnt;.*/ UBYTE SMPPrivate4;/' -e 's/.*TDNestCnt;.*/ UBYTE SMPPrivate5;/' $@
83 $(AROS_INCLUDES)/exec/execbase.h : $(GENINCDIR)/exec/execbase.h
84 @$(ECHO) "Copying C includes to $(AROS_INCLUDES)..."
88 includes-execbase_h : $(AROS_INCLUDES)/exec/execbase.h
90 .PHONY : includes-execbase_h
92 # normal include copy routines
94 $(AROS_INCLUDES)/%.h : $(SRCDIR)/$(CURDIR)/%.h
95 @$(ECHO) "Copying C includes to $(AROS_INCLUDES)..."
98 $(GENINCDIR)/%.h : $(SRCDIR)/$(CURDIR)/%.h
99 @$(ECHO) "Copying C includes to $(GENINCDIR)..."
102 $(AROS_INCLUDES)/%.hpp : $(SRCDIR)/$(CURDIR)/%.hpp
103 @$(ECHO) "Copying C++ includes to $(AROS_INCLUDES)..."
106 $(GENINCDIR)/%.hpp : $(SRCDIR)/$(CURDIR)/%.hpp
107 @$(ECHO) "Copying C++ includes to $(GENINCDIR)..."
113 @$(ECHO) "Creating $@..."
117 includes-asm_h-$(CPU) : $(GENINCDIR)/aros/$(CPU)/asm.h
119 .PHONY : includes-asm_h-$(CPU)
121 $(OBJDIR)/asm.s : $(SRCDIR)/$(CURDIR)/asm.c | $(OBJDIR)
122 @$(ECHO) "Compiling $<..."
123 @$(TARGET_CC) $(TARGET_SYSROOT) $(CFLAGS) $(PRIV_EXEC_INCLUDES) $(PRIV_KERNEL_INCLUDES) -S $< -o $@
125 $(GENINCDIR)/aros/$(CPU)/asm.h : $(OBJDIR)/asm.s | $(GENINCDIR)/aros/$(AROS_TARGET_CPU)
126 @$(ECHO) Generating $@...
127 grep ".asciz" $< | cut -d'"' -f2 | sed 's/\$$//g' >$@
132 $(GENINCDIR)/aros/$(CPU) :
137 -$(RM) $(AROS_INCLUDES) $(GENINCDIR)