rom/oop: -Wall cleanups
[AROS.git] / compiler / include / mmakefile
blobcd52ea816b18d955d2fdc47ee036e9af2c226555
1 # $Id$
2 include $(TOP)/config/make.cfg
4 INCSUBDIRS :=   aros \
5                 aros/preprocessor \
6                 aros/preprocessor/facilities \
7                 aros/preprocessor/variadic \
8         bluetooth \
9                 c++ \
10                 c++/exec \
11                 clib \
12                 datatypes \
13                 defines \
14                 devices \
15                 diskfont \
16                 dos \
17                 exec \
18                 gadgets \
19                 graphics \
20                 hardware \
21                 hardware/cpu \
22                 hardware/acpi \
23                 hardware/pic \
24                 hidd \
25                 intuition \
26         irda \
27                 libraries \
28                 midi \
29                 pragmas \
30                 prefs \
31                 proto \
32                 resources \
33                 rexx \
34         scsi \
35                 utility \
36                 workbench
38 INCLUDES      := $(foreach d,$(INCSUBDIRS),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp))
39 ARCHINCDIR    := $(SRCDIR)/arch/$(CPU)-$(ARCH)/include/
40 ARCH_INCLUDES := $(subst $(ARCHINCDIR),,$(foreach d,$(addprefix $(ARCHINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
41 INCLUDES      := $(filter-out rexx/rexxcall-%.h $(ARCH_INCLUDES),$(INCLUDES))
42 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
43 GEN_INCLUDES  := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
44 INCL_DIRS     := $(foreach dir,$(INCSUBDIRS),$(AROS_INCLUDES)/$(dir)) \
45                  $(foreach dir,$(INCSUBDIRS),$(GENINCDIR)/$(dir))
47 #MM- includes : includes-generate
48 #MM- includes-generate : includes-generate-deps
49 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU)
50 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU)
52 #MM- includes-$(ARCH)-$(CPU) : \
53 #MM     includes-copy-$(ARCH)-$(CPU) \
54 #MM     includes-generate-$(ARCH)-$(CPU)
55 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
56 #MM- includes-copy-$(ARCH)-$(CPU) :
58 #MM
59 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES)
61 ifeq ($(TARGET_CPU),m68k)
62 $(AROS_INCLUDES)/rexx/rexxcall.h : rexx/rexxcall-m68k.h
63         @$(CP) $< $@
65 $(GENINCDIR)/rexx/rexxcall.h : rexx/rexxcall-m68k.h
66         @$(CP) $< $@
67 endif
69 $(AROS_INCLUDES)/%.h : %.h
70         @$(CP) $< $@
72 $(GENINCDIR)/%.h : %.h
73         @$(CP) $< $@
75 $(AROS_INCLUDES)/%.hpp : %.hpp
76         @$(CP) $< $@
78 $(GENINCDIR)/%.hpp : %.hpp
79         @$(CP) $< $@
81 setup : $(INCL_DIRS)
83 $(INCL_DIRS) :
84         @$(MKDIR) $@
86 #MM
87 clean :
88         -$(RM) $(AROS_INCLUDES) $(GENINCDIR)