Comment out INCEMPTYDIRS definition, as there are currently no empty dirs.
[AROS.git] / compiler / include / mmakefile
blob8dfbaa7aa89a755052681aec84a0e8920c22c6ab
1 # $Id$
3 include $(SRCDIR)/config/aros.cfg
4 include $(TOP)/$(CURDIR)/geninc.cfg
6 INCSUBDIRS :=   aros                            \
7                 aros/preprocessor               \
8                 aros/preprocessor/facilities    \
9                 aros/preprocessor/variadic      \
10                 aros/types                      \
11                 asm                             \
12                 bluetooth                       \
13                 c++                             \
14                 c++/exec                        \
15                 clib                            \
16                 datatypes                       \
17                 defines                         \
18                 devices                         \
19                 diskfont                        \
20                 dos                             \
21                 exec                            \
22                 gadgets                         \
23                 graphics                        \
24                 hardware                        \
25                 hardware/cpu                    \
26                 hardware/efi                    \
27                 hardware/pic                    \
28                 hidd                            \
29                 inline                          \
30                 intuition                       \
31                 irda                            \
32                 libcore                         \
33                 libraries                       \
34                 midi                            \
35                 pragmas                         \
36                 prefs                           \
37                 proto                           \
38                 resources                       \
39                 rexx                            \
40                 SDI                             \
41                 scsi                            \
42                 utility                         \
43                 workbench
45 # clib & proto are handled above.
46 #INCEMPTYDIRS := defines                                \
47 #               inline
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) :
70 #MM
71 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES) includes-execbase_h
73 # execbase is copied seperately, since on SMP builds we need to
74 # remove some fields
76 $(GENINCDIR)/exec/execbase.h : $(SRCDIR)/$(CURDIR)/exec/execbase.inc
77         @$(ECHO) "Copying    C   includes to $(GENINCDIR)..."
78         @$(CP) $< $@
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;/' $@
81 endif
83 $(AROS_INCLUDES)/exec/execbase.h : $(GENINCDIR)/exec/execbase.h
84         @$(ECHO) "Copying    C   includes to $(AROS_INCLUDES)..."
85         @$(CP) $< $@
87 #MM
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)..."
96         @$(CP) $< $@
98 $(GENINCDIR)/%.h : $(SRCDIR)/$(CURDIR)/%.h
99         @$(ECHO) "Copying    C   includes to $(GENINCDIR)..."
100         @$(CP) $< $@
102 $(AROS_INCLUDES)/%.hpp : $(SRCDIR)/$(CURDIR)/%.hpp
103         @$(ECHO) "Copying    C++ includes to $(AROS_INCLUDES)..."
104         @$(CP) $< $@
106 $(GENINCDIR)/%.hpp : $(SRCDIR)/$(CURDIR)/%.hpp
107         @$(ECHO) "Copying    C++ includes to $(GENINCDIR)..."
108         @$(CP) $< $@
110 setup : $(INCL_DIRS)
112 $(INCL_DIRS) :
113         @$(ECHO) "Creating   $@..."
114         @$(MKDIR) $@
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' >$@
129 $(OBJDIR) :
130         @$(MKDIR) $@
132 $(GENINCDIR)/aros/$(CPU) :
133         @$(MKDIR) $@
136 clean :
137         -$(RM) $(AROS_INCLUDES) $(GENINCDIR)