Fixed binary search: no more infinite loops when vendor is unknown.
[tangerine.git] / compiler / include / mmakefile
blob2fd57ebedb741ab62838bad772d571d4910af983
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 ARCHINCDIR    := $(SRCDIR)/arch/$(CPU)-$(ARCH)/include/
37 ARCH_INCLUDES := $(subst $(ARCHINCDIR),,$(foreach d,$(addprefix $(ARCHINCDIR),$(INCSUBDIRS)),$(wildcard $(d)/*.h) $(wildcard $(d)/*.hpp)))
38 INCLUDES      := $(filter-out rexx/rexxcall-%.h $(ARCH_INCLUDES),$(INCLUDES))
39 DEST_INCLUDES := $(foreach f,$(INCLUDES),$(AROS_INCLUDES)/$(f))
40 GEN_INCLUDES  := $(foreach f,$(INCLUDES),$(GENINCDIR)/$(f))
41 INCL_DIRS     := $(foreach dir,$(INCSUBDIRS),$(AROS_INCLUDES)/$(dir)) \
42                  $(foreach dir,$(INCSUBDIRS),$(GENINCDIR)/$(dir))
44 #MM- includes : includes-generate
45 #MM- includes-generate : includes-generate-deps
46 #MM- includes-generate-deps : includes-copy includes-$(ARCH)-$(CPU)
47 #MM- includes-copy : compiler-includes includes-copy-$(ARCH)-$(CPU)
49 #MM- includes-$(ARCH)-$(CPU) : \
50 #MM     includes-copy-$(ARCH)-$(CPU) \
51 #MM     includes-generate-$(ARCH)-$(CPU)
52 #MM- includes-generate-$(ARCH)-$(CPU) : includes-copy-$(ARCH)-$(CPU)
53 #MM- includes-copy-$(ARCH)-$(CPU) :
55 #MM
56 compiler-includes : setup $(DEST_INCLUDES) $(GEN_INCLUDES)
58 ifeq ($(TARGET_CPU),m68k)
59 $(AROS_INCLUDES)/rexx/rexxcall.h : rexx/rexxcall-m68k.h
60         @$(CP) $< $@
62 $(GENINCDIR)/rexx/rexxcall.h : rexx/rexxcall-m68k.h
63         @$(CP) $< $@
64 endif
66 $(AROS_INCLUDES)/%.h : %.h
67         @$(CP) $< $@
69 $(GENINCDIR)/%.h : %.h
70         @$(CP) $< $@
72 $(AROS_INCLUDES)/%.hpp : %.hpp
73         @$(CP) $< $@
75 $(GENINCDIR)/%.hpp : %.hpp
76         @$(CP) $< $@
78 setup : $(INCL_DIRS)
80 $(INCL_DIRS) :
81         @$(MKDIR) $@
83 #MM
84 clean :
85         -$(RM) $(AROS_INCLUDES) $(GENINCDIR)