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 ARCHFAMILYINCDIR := $(SRCDIR)/arch/$(CPU)-$(FAMILY)/include/
53 ARCH_INCLUDES := $(subst $(ARCHINCDIR),,$(foreach d,$(addprefix $(ARCHINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
54 ARCHFAMILY_INCLUDES := $(subst $(ARCHFAMILYINCDIR),,$(foreach d,$(addprefix $(ARCHFAMILYINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
55 # ARCH > FAMILY > GENERIC
56 INCLUDES := $(filter-out $(strip $(ARCH_INCLUDES) $(filter-out $(ARCH_INCLUDES),$(ARCHFAMILY_INCLUDES))),$(INCLUDES))
57 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
58 GEN_INCLUDES := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
59 INCL_DIRS := $(foreach dir,$(INCSUBDIRS) $(INCEMPTYDIRS),$(AROS_INCLUDES)/$(dir)) \
60 $(foreach dir,$(INCSUBDIRS) $(INCEMPTYDIRS),$(GENINCDIR)/$(dir))
62 #MM- includes : includes-generate
63 #MM- includes-generate : includes-generate-deps
64 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU) includes-$(FAMILY)-$(CPU)
65 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU) includes-copy-$(FAMILY)-$(CPU)
67 #MM- includes-$(ARCH)-$(CPU) : \
68 #MM includes-copy-$(ARCH)-$(CPU) \
69 #MM includes-generate-$(ARCH)-$(CPU)
70 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
71 #MM- includes-copy-$(ARCH)-$(CPU) :
73 #MM- includes-$(FAMILY)-$(CPU) : \
74 #MM includes-copy-$(FAMILY)-$(CPU) \
75 #MM includes-generate-$(FAMILY)-$(CPU)
76 #MM- includes-generate-$(FAMILY)-$(CPU) : includes-copy-$(FAMILY)-$(CPU)
77 #MM- includes-copy-$(FAMILY)-$(CPU) :
80 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES) includes-execbase_h
82 # execbase is copied seperately, since on SMP builds we need to
85 $(GENINCDIR)/exec/execbase.h : $(SRCDIR)/$(CURDIR)/exec/execbase.inc
86 @$(ECHO) "Copying C includes to $(GENINCDIR)..."
88 ifneq ($(strip $(EXECSMP)),"")
89 $(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;/' $@
92 $(AROS_INCLUDES)/exec/execbase.h : $(GENINCDIR)/exec/execbase.h
93 @$(ECHO) "Copying C includes to $(AROS_INCLUDES)..."
97 includes-execbase_h : $(AROS_INCLUDES)/exec/execbase.h
99 .PHONY : includes-execbase_h
101 # normal include copy routines
103 $(AROS_INCLUDES)/%.h : $(SRCDIR)/$(CURDIR)/%.h
104 @$(ECHO) "Copying C includes to $(AROS_INCLUDES)..."
107 $(GENINCDIR)/%.h : $(SRCDIR)/$(CURDIR)/%.h
108 @$(ECHO) "Copying C includes to $(GENINCDIR)..."
111 $(AROS_INCLUDES)/%.hpp : $(SRCDIR)/$(CURDIR)/%.hpp
112 @$(ECHO) "Copying C++ includes to $(AROS_INCLUDES)..."
115 $(GENINCDIR)/%.hpp : $(SRCDIR)/$(CURDIR)/%.hpp
116 @$(ECHO) "Copying C++ includes to $(GENINCDIR)..."
122 @$(ECHO) "Creating $@..."
126 includes-asm_h-$(CPU) : $(GENINCDIR)/aros/$(CPU)/asm.h
128 .PHONY : includes-asm_h-$(CPU)
130 $(OBJDIR)/asm.s : $(SRCDIR)/$(CURDIR)/asm.c | $(OBJDIR)
131 @$(ECHO) "Compiling $<..."
132 @$(TARGET_CC) $(TARGET_SYSROOT) $(CFLAGS) $(PRIV_EXEC_INCLUDES) $(PRIV_KERNEL_INCLUDES) -S $< -o $@
134 $(GENINCDIR)/aros/$(CPU)/asm.h : $(OBJDIR)/asm.s | $(GENINCDIR)/aros/$(AROS_TARGET_CPU)
135 @$(ECHO) Generating $@...
136 grep ".asciz" $< | cut -d'"' -f2 | sed 's/\$$//g' >$@
141 $(GENINCDIR)/aros/$(CPU) :
146 -$(RM) $(AROS_INCLUDES) $(GENINCDIR)