Type of RDA_DAList changed to IPTR to prevent problems on x86-64 - it's used to store...
[AROS.git] / Makefile.in
blobc1b2de3d8b3bf954197f49a603db6ac855805cfa
1 # Copyright © 2000-2003, The AROS Development Team. All rights reserved.
2 # $Id$
4 # Main makefile for AROS
6 default: all
8 AROS_HOST_CPU ?= @aros_host_cpu@
9 AROS_HOST_ARCH ?= @aros_host_arch@
10 AROS_TARGET_CPU ?= @aros_target_cpu@
11 AROS_TARGET_ARCH ?= @aros_target_arch@
12 AROS_TARGET_VARIANT ?= @aros_target_variant@
14 # normally, these variable's should go in mmake.config/globalvarfile
15 export AROS_TARGET_BOOTLOADER := @aros_target_bootloader@
16 export AROS_GUI_THEME := @aros_target_guitheme@
18 TOP := @AROS_BUILDDIR@
19 AROS_SRC := @AROS_SRCDIR@
20 include $(TOP)/config/make.cfg
22 all: makedirs tools mmake
23 @+$(CALL) $(MMAKE) AROS.AROS
25 makedirs:
26 @$(RM) $(TOP)/errors
27 @$(FOR) dir in $(AROSDIR) $(GENDIR) $(TOOLDIR) ; do \
28 $(IF) [ ! -d $$dir ]; then \
29 $(MECHO) $(MKDIR) "$$dir" ; \
30 $(MKDIR) "$$dir" ; \
31 else true ; fi ; \
32 done
33 @$(IF) [ ! -f $(AROSDIR)/.gdbinit ]; then \
34 $(CP) $(AROS_SRC)/_gdbinit $(AROSDIR)/.gdbinit ; \
35 else true ; fi
37 # Create the tools that are used to build AROS.
38 tools : makedirs $(TOOLLIB) $(GENMF) $(ARCHTOOL) \
39 $(FLEXCAT) $(CREATEDTDESC) $(ILBMTOC) $(ILBMTOICON) \
40 $(COLLECT-AROS) $(AFSLIB) $(COPYTOAFS) \
41 $(FD2INLINE) $(FD2PRAGMA) $(SFDC)
43 $(TOOLLIB) : $(wildcard $(AROS_SRC)/tools/toollib/*.[ch])
44 @$(ECHO) Building toollib...
45 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/toollib AROS_SRC=$(AROS_SRC) TOP=$(TOP)
47 $(GENMF) : $(AROS_SRC)/tools/genmf/genmf.py
48 @$(ECHO) Copying genmf...
49 @./config.status $(subst $(TOP)/,,$(GENMF)) genmf_executable
51 $(ARCHTOOL) : $(AROS_SRC)/tools/archtools/archtool.c
52 @$(ECHO) Building archtool...
53 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/archtools AROS_SRC=$(AROS_SRC) TOP=$(TOP)
55 $(FLEXCAT) : $(AROS_SRC)/tools/FlexCat/flexcat.c
56 @$(ECHO) Building flexcat...
57 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/FlexCat AROS_SRC=$(AROS_SRC) TOP=$(TOP)
59 $(CREATEDTDESC) : $(wildcard $(AROS_SRC)/tools/dtdesc/*.[ch]) $(wildcard $(AROS_SRC)/tools/dtdesc/c_iff/*.[ch])
60 @$(ECHO) Building createdtdesc...
61 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/dtdesc -f Makefile.aros AROS_SRC=$(AROS_SRC) TOP=$(TOP)
63 $(AFSLIB) : $(wildcard $(AROS_SRC)/workbench/devs/afs/*.[ch])
64 @$(ECHO) Building afslib...
65 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/copytoafs -f Makefile.afslib AROS_SRC=$(AROS_SRC) TOP=$(TOP)
67 $(COPYTOAFS) : $(AFSLIB) $(AROS_SRC)/tools/copytoafs/copytoafs.c
68 @$(ECHO) Building copytoafs...
69 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/copytoafs AROS_SRC=$(AROS_SRC) TOP=$(TOP)
71 $(ILBMTOC) : $(AROS_SRC)/tools/ilbmtoc/ilbmtoc.c
72 @$(ECHO) Building ilbmtoc...
73 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/ilbmtoc AROS_SRC=$(AROS_SRC) TOP=$(TOP)
75 $(ILBMTOICON) : $(AROS_SRC)/tools/ilbmtoicon/ilbmtoicon.c
76 @$(ECHO) Building ilbmtoicon...
77 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/ilbmtoicon AROS_SRC=$(AROS_SRC) TOP=$(TOP)
79 $(COLLECT-AROS) : $(wildcard $(AROS_SRC)/tools/collect-aros/*.[hc])
80 @$(ECHO) Building collect-aros...
81 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/collect-aros AROS_SRC=$(AROS_SRC) TOP=$(TOP)
83 $(FD2INLINE) : $(AROS_SRC)/tools/fd2inline/fd2inline.c
84 @$(ECHO) Building fd2inline...
85 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/fd2inline AROS_SRC=$(AROS_SRC) TOP=$(TOP)
87 $(FD2PRAGMA) : $(AROS_SRC)/tools/fd2pragma/fd2pragma.c
88 @$(ECHO) Building fd2pragma...
89 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/fd2pragma AROS_SRC=$(AROS_SRC) TOP=$(TOP)
91 $(SFDC) : $(AROS_SRC)/tools/sfdc/*.pl
92 @$(ECHO) Building sfdc...
93 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/sfdc AROS_SRC=$(AROS_SRC) TOP=$(TOP)
95 # MetaMake apparently requires a slighty different compilation. Probably
96 # because it is sort-of an external package as well.
98 mmake : $(TOP)/tools/MetaMake/Makefile $(MMAKE)
100 $(AROS_SRC)/tools/MetaMake/configure : $(AROS_SRC)/tools/MetaMake/configure.in
101 @$(ECHO) Building MetaMake...
102 @cd $(AROS_SRC)/tools/MetaMake && @aros_host_aclocal@ && @aros_host_autoconf@
104 $(TOP)/tools/MetaMake/Makefile : $(AROS_SRC)/tools/MetaMake/configure $(AROS_SRC)/tools/MetaMake/Makefile.in
105 @$(IF) [ ! -d $(TOP)/tools/MetaMake ]; then \
106 $(MECHO) $(MKDIR) "$(TOP)/tools/MetaMake" ; \
107 $(MKDIR) "$(TOP)/tools/MetaMake"; \
109 @cd $(TOP)/tools/MetaMake ; CC="$(HOST_CC)" CFLAGS= $(AROS_SRC)/tools/MetaMake/configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) --with-objfiledir=$(HOSTGENDIR)/tools/MetaMake
111 $(MMAKE): $(TOP)/tools/MetaMake/Makefile $(wildcard $(AROS_SRC)/tools/MetaMake/*.[ch]) $(GENMF)
112 @$(MAKE) $(MKARGS) AUTOHEADER=@aros_host_autoheader@ -C $(TOP)/tools/MetaMake
113 @$(MAKE) $(MKARGS) -C $(TOP)/tools/MetaMake install
115 # Clean the sources and tools
116 clean:
117 @+$(CALL) $(MMAKE) AROS.clean
118 @$(MAKE) $(MKARGS) -C $(TOP)/tools/MetaMake clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
119 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/FlexCat clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
120 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/archtools clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
121 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/genmf clean
122 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/toollib clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
123 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/dtdesc -f Makefile.aros clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
124 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/collect-aros clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
125 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/fd2inline clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
126 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/fd2pragma clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
127 @$(CALL) $(MAKE) $(MKARGS) -C $(AROS_SRC)/tools/sfdc clean AROS_SRC=$(AROS_SRC) TOP=$(TOP)
128 -@$(RM) $(ARCHDIR) Makefile config.cache config.status config.log mmake.cache mmake.config rom/mmakefile config/make.cfg $(AROS_DEVELOPMENT)/include/aros/config.h $(GENDIR)/include/aros/config.h $(HOSTGENDIR)/config/host.cfg $(GENDIR)/config/target.cfg $(GENDIR)/config/make.defaults $(GENDIR)/config/specs $(TOOLDIR)/$(AROS_TARGET_CPU)-$(AROS_TARGET_ARCH)$(AROS_TARGET_SUFFIX)-aros-gcc $(TOOLDIR)/$(AROS_TARGET_CPU)-$(AROS_TARGET_ARCH)$(AROS_TARGET_SUFFIX)-aros-ld $(GENDIR)/scripts/genshared $(TOOLDIR)/genmf.py tools/adflib/myconf.aros tools/collect-aros/env.h
130 # Clean the sources and tools
131 arch-clean: clean
132 @$(NOP)
134 # Really clean all - like a clean checkout
135 dist-clean: arch-clean
136 @$(NOP)
138 # Dependencies don't work with .DEFAULT :-(
139 docs : makedirs tools mmake
140 @+$(CALL) $(MMAKE) AROS.docs
142 all-docs : makedirs tools mmake
143 @+$(CALL) $(MMAKE) AROS.all-docs
145 sdk : makedirs tools mmake
146 @+$(CALL) $(MMAKE) AROS.sdk
148 install : makedirs tools mmake
149 @+$(CALL) $(MMAKE) AROS.install
151 # Don't try to generate $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts
152 $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts:
153 @$(NOP)
155 # targets which do not generate files or for which a file/directory exists
156 .PHONY: default all makedirs tools docs clean arch-clean dist-clean install \
157 $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts test \
158 kernel workbench rom compiler contrib sdk mmake
160 # Workaround for bug in make v3.81 (should normally be handled by .DEFAULT)
161 test kernel workbench rom compiler contrib :
162 @+$(CALL) $(MMAKE) AROS.$@
164 # Map MetaTargets to make targets : Call mmake with AROS.target
165 # This does not allow to check for dependancies, so it is not suitable for
166 # Calling standard main targets, but is usable as a shortcut for MetaMake
167 # if it was not installed globally
168 .DEFAULT :
169 @+$(CALL) $(MMAKE) AROS.$@