- Updates to entry selection behaviour to accommodate multiselection test
[AROS.git] / compiler / include / mmakefile
blobed5af65dc31cb8c22bb2252db62f160d898a20e0
1 # $Id$
3 include $(SRCDIR)/config/aros.cfg
5 INCSUBDIRS :=   aros                            \
6                 aros/preprocessor               \
7                 aros/preprocessor/facilities    \
8                 aros/preprocessor/variadic      \
9                 aros/types                      \
10                 asm                             \
11                 bluetooth                       \
12                 c++                             \
13                 c++/exec                        \
14                 clib                            \
15                 datatypes                       \
16                 devices                         \
17                 diskfont                        \
18                 dos                             \
19                 exec                            \
20                 gadgets                         \
21                 graphics                        \
22                 hardware                        \
23                 hardware/cpu                    \
24                 hardware/efi                    \
25                 hardware/pic                    \
26                 hidd                            \
27                 intuition                       \
28                 irda                            \
29                 libcore                         \
30                 libraries                       \
31                 midi                            \
32                 pragmas                         \
33                 prefs                           \
34                 proto                           \
35                 resources                       \
36                 rexx                            \
37                 SDI                             \
38                 scsi                            \
39                 utility                         \
40                 workbench
42 # clib & proto are handled above.
43 INCEMPTYDIRS := defines                         \
44                 inline
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) :
66 #MM
67 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES)
69 $(AROS_INCLUDES)/%.h : %.h
70         @$(ECHO) "Copying    C   includes to $(AROS_INCLUDES)..."
71         @$(CP) $< $@
73 $(GENINCDIR)/%.h : %.h
74         @$(ECHO) "Copying    C   includes to $(GENINCDIR)..."
75         @$(CP) $< $@
77 $(AROS_INCLUDES)/%.hpp : %.hpp
78         @$(ECHO) "Copying    C++ includes to $(AROS_INCLUDES)..."
79         @$(CP) $< $@
81 $(GENINCDIR)/%.hpp : %.hpp
82         @$(ECHO) "Copying    C++ includes to $(GENINCDIR)..."
83         @$(CP) $< $@
85 setup : $(INCL_DIRS)
87 $(INCL_DIRS) :
88         @$(ECHO) "Creating   $@..."
89         @$(MKDIR) $@
91 #MM
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 ".asci" $< | cut -d'"' -f2 | sed 's/\$$//g' >$@
104 $(OBJDIR) :
105         @$(MKDIR) $@
107 $(GENINCDIR)/aros/$(CPU) :
108         @$(MKDIR) $@
111 clean :
112         -$(RM) $(AROS_INCLUDES) $(GENINCDIR)