squashed commit of private hostlib-resource branch
[tangerine.git] / compiler / include / mmakefile
blobfe3b0d68a4d6065dd7a2985a16c306db1434f2ed
1 # $Id$
2 include $(TOP)/config/make.cfg
4 INCSUBDIRS :=   aros \
5                 aros/preprocessor \
6                 aros/preprocessor/facilities \
7                 aros/preprocessor/variadic \
8                 c++ \
9                 c++/exec \
10                 clib \
11                 datatypes \
12                 defines \
13                 devices \
14                 diskfont \
15                 dos \
16                 exec \
17                 gadgets \
18                 graphics \
19                 hardware \
20                 hardware/cpu \
21                 hardware/acpi \
22                 hardware/pic \
23                 hidd \
24                 intuition \
25                 libraries \
26                 midi \
27                 pragmas \
28                 prefs \
29                 proto \
30                 resources \
31                 rexx \
32                 utility \
33                 workbench
35 INCLUDES      := $(foreach d,$(INCSUBDIRS),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp))
36 INCLUDES      := $(filter-out rexx/rexxcall-%.h,$(INCLUDES))
37 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
38 GEN_INCLUDES  := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
39 INCL_DIRS     := $(foreach dir,$(INCSUBDIRS),$(AROS_INCLUDES)/$(dir)) \
40                  $(foreach dir,$(INCSUBDIRS),$(GENINCDIR)/$(dir))
42 #MM- includes : includes-generate
43 #MM- includes-generate : includes-generate-deps
44 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU)
45 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU)
47 #MM- includes-$(ARCH)-$(CPU) : \
48 #MM     includes-copy-$(ARCH)-$(CPU) \
49 #MM     includes-generate-$(ARCH)-$(CPU)
50 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
51 #MM- includes-copy-$(ARCH)-$(CPU) :
53 #MM
54 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES)
56 ifeq ($(TARGET_CPU),m68k)
57 $(AROS_INCLUDES)/rexx/rexxcall.h : rexx/rexxcall-m68k.h
58         @$(CP) $< $@
60 $(GENINCDIR)/rexx/rexxcall.h : rexx/rexxcall-m68k.h
61         @$(CP) $< $@
62 endif
64 $(AROS_INCLUDES)/%.h : %.h
65         @$(CP) $< $@
67 $(GENINCDIR)/%.h : %.h
68         @$(CP) $< $@
70 $(AROS_INCLUDES)/%.hpp : %.hpp
71         @$(CP) $< $@
73 $(GENINCDIR)/%.hpp : %.hpp
74         @$(CP) $< $@
76 setup : $(INCL_DIRS)
78 $(INCL_DIRS) :
79         @$(MKDIR) $@
81 #MM
82 clean :
83         -$(RM) $(AROS_INCLUDES) $(GENINCDIR)