Small bits of sofware screen composition support.
[AROS.git] / Makefile.in
blob186589238c3a490b15b8e39522de6817f7372dc7
1 # Copyright © 2000-2011, 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_TARGET_ICONSET := @aros_target_iconset@
17 export AROS_GUI_THEME := @aros_target_guitheme@
19 TOP := @AROS_BUILDDIR@
20 SRCDIR := @SRCDIR@
21 include $(TOP)/config/make.cfg
23 MMAKE_OPTIONS ?= --srcdir=$(SRCDIR) --builddir=$(TOP)
24 ifneq (,$(findstring s,$(MAKEFLAGS)))
25 MMAKE_OPTIONS += -q
26 endif
28 all: crosstools
29 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.AROS
31 makedirs:
32 @$(RM) $(TOP)/errors
33 @$(FOR) dir in $(AROSDIR) $(GENDIR) $(TOOLDIR) ; do \
34 $(IF) [ ! -d $$dir ]; then \
35 $(MECHO) $(MKDIR) "$$dir" ; \
36 $(MKDIR) "$$dir" ; \
37 else true ; fi ; \
38 done
39 @$(IF) [ ! -f $(AROSDIR)/.gdbinit ]; then \
40 $(CP) $(SRCDIR)/_gdbinit $(AROSDIR)/.gdbinit ; \
41 else true ; fi
43 # Create the tools that are used to build AROS.
44 tools : makedirs mmake $(TOOLLIB) $(GENMF) $(ARCHTOOL) $(ELF2HUNK) \
45 $(FLEXCAT) $(CREATEDTDESC) $(ILBMTOC) $(ILBMTOICON) \
46 $(COLLECT-AROS) $(AFSLIB) $(COPYTOAFS) \
47 $(FD2INLINE) $(FD2PRAGMA) $(SFDC) $(SETREV)
49 crosstools : tools
50 ifneq ($(CROSSTOOLS_TARGET),)
51 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$(CROSSTOOLS_TARGET)
52 else
53 @$(NOP)
54 endif
56 $(TOOLLIB) : $(wildcard $(SRCDIR)/tools/toollib/*.[ch])
57 @$(ECHO) Building toollib...
58 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/toollib SRCDIR=$(SRCDIR) TOP=$(TOP) CURDIR=toollib
60 $(GENMF) : $(SRCDIR)/tools/genmf/genmf.py
61 @$(ECHO) Copying genmf...
62 @./config.status $(subst $(TOP)/,,$(GENMF)) genmf_executable
64 $(ELF2HUNK) : $(SRCDIR)/tools/elf2hunk/elf2hunk.c
65 @$(ECHO) Building elf2hunk...
66 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/elf2hunk SRCDIR=$(SRCDIR) TOP=$(TOP)
68 $(ARCHTOOL) : $(SRCDIR)/tools/archtools/archtool.c
69 @$(ECHO) Building archtool...
70 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/archtools SRCDIR=$(SRCDIR) TOP=$(TOP)
72 $(FLEXCAT) : $(SRCDIR)/tools/FlexCat/flexcat.c
73 @$(ECHO) Building flexcat...
74 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/FlexCat SRCDIR=$(SRCDIR) TOP=$(TOP)
76 $(CREATEDTDESC) : $(wildcard $(SRCDIR)/tools/dtdesc/*.[ch]) $(wildcard $(SRCDIR)/tools/dtdesc/c_iff/*.[ch])
77 @$(ECHO) Building createdtdesc...
78 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/dtdesc -f Makefile.aros SRCDIR=$(SRCDIR) TOP=$(TOP)
80 $(AFSLIB) : $(wildcard $(SRCDIR)/workbench/devs/afs/*.[ch])
81 @$(ECHO) Building afslib...
82 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/copytoafs -f Makefile.afslib SRCDIR=$(SRCDIR) TOP=$(TOP)
84 $(COPYTOAFS) : $(AFSLIB) $(SRCDIR)/tools/copytoafs/copytoafs.c
85 @$(ECHO) Building copytoafs...
86 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/copytoafs SRCDIR=$(SRCDIR) TOP=$(TOP)
88 $(ILBMTOC) : $(SRCDIR)/tools/ilbmtoc/ilbmtoc.c
89 @$(ECHO) Building ilbmtoc...
90 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/ilbmtoc SRCDIR=$(SRCDIR) TOP=$(TOP)
92 $(ILBMTOICON) : $(SRCDIR)/tools/ilbmtoicon/ilbmtoicon.c
93 @$(ECHO) Building ilbmtoicon...
94 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/ilbmtoicon SRCDIR=$(SRCDIR) TOP=$(TOP)
96 $(COLLECT-AROS) : $(wildcard $(SRCDIR)/tools/collect-aros/*.[hc])
97 @$(ECHO) Building collect-aros...
98 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/collect-aros SRCDIR=$(SRCDIR) TOP=$(TOP)
100 $(FD2INLINE) : $(SRCDIR)/tools/fd2inline/fd2inline.c
101 @$(ECHO) Building fd2inline...
102 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/fd2inline SRCDIR=$(SRCDIR) TOP=$(TOP)
104 $(FD2PRAGMA) : $(SRCDIR)/tools/fd2pragma/fd2pragma.c
105 @$(ECHO) Building fd2pragma...
106 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/fd2pragma SRCDIR=$(SRCDIR) TOP=$(TOP)
108 $(SFDC) : $(SRCDIR)/tools/sfdc/*.pl
109 @$(ECHO) Building sfdc...
110 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/sfdc SRCDIR=$(SRCDIR) TOP=$(TOP)
112 $(SETREV) : $(SRCDIR)/tools/setrev/setrev.c
113 @$(ECHO) Building setrev...
114 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/setrev SRCDIR=$(SRCDIR) TOP=$(TOP)
116 # MetaMake apparently requires a slighty different compilation. Probably
117 # because it is sort-of an external package as well.
119 mmake : $(TOP)/tools/MetaMake/Makefile $(MMAKE)
121 $(SRCDIR)/tools/MetaMake/configure : $(SRCDIR)/tools/MetaMake/configure.in
122 @$(ECHO) Building MetaMake...
123 @cd $(SRCDIR)/tools/MetaMake && @aros_host_aclocal@ && @aros_host_autoconf@
125 $(TOP)/tools/MetaMake/Makefile : $(SRCDIR)/tools/MetaMake/configure $(SRCDIR)/tools/MetaMake/Makefile.in
126 @$(IF) [ ! -d $(TOP)/tools/MetaMake ]; then \
127 $(MECHO) $(MKDIR) "$(TOP)/tools/MetaMake" ; \
128 $(MKDIR) "$(TOP)/tools/MetaMake"; \
130 @cd $(TOP)/tools/MetaMake ; CC="$(HOST_CC)" CFLAGS="$(HOST_CFLAGS) -D_FILE_OFFSET_BITS=64" LDFLAGS="$(HOST_LDFLAGS)" $(SRCDIR)/tools/MetaMake/configure --prefix=$(TOOLDIR) --bindir=$(TOOLDIR) --with-objfiledir=$(HOSTGENDIR)/tools/MetaMake
132 $(MMAKE): $(TOP)/tools/MetaMake/Makefile $(wildcard $(SRCDIR)/tools/MetaMake/*.[ch]) $(GENMF)
133 @$(MAKE) $(MKARGS) AUTOHEADER=@aros_host_autoheader@ -C $(TOP)/tools/MetaMake
134 @$(MAKE) $(MKARGS) -C $(TOP)/tools/MetaMake install
136 # Clean the sources and tools
137 clean:
138 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.clean
139 @$(MAKE) $(MKARGS) -C $(TOP)/tools/MetaMake clean SRCDIR=$(SRCDIR) TOP=$(TOP)
140 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/FlexCat clean SRCDIR=$(SRCDIR) TOP=$(TOP)
141 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/archtools clean SRCDIR=$(SRCDIR) TOP=$(TOP)
142 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/genmf clean
143 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/toollib clean SRCDIR=$(SRCDIR) TOP=$(TOP)
144 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/dtdesc -f Makefile.aros clean SRCDIR=$(SRCDIR) TOP=$(TOP)
145 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/collect-aros clean SRCDIR=$(SRCDIR) TOP=$(TOP)
146 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/fd2inline clean SRCDIR=$(SRCDIR) TOP=$(TOP)
147 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/fd2pragma clean SRCDIR=$(SRCDIR) TOP=$(TOP)
148 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/sfdc clean SRCDIR=$(SRCDIR) TOP=$(TOP)
149 @$(CALL) $(MAKE) $(MKARGS) -C $(SRCDIR)/tools/setrev clean SRCDIR=$(SRCDIR) TOP=$(TOP)
150 -@$(RM) $(ARCHDIR) Makefile config.cache config.status config.log \
151 mmake.cache mmake.config rom/mmakefile config/make.cfg \
152 $(AROS_DEVELOPMENT)/include/aros/config.h \
153 $(GENDIR)/include/aros/config.h $(HOSTGENDIR)/config/host.cfg \
154 $(GENDIR)/config/target.cfg $(GENDIR)/config/make.defaults \
155 $(GENDIR)/config/specs \
156 $(TOOLDIR)/$(AROS_TARGET_CPU)-$(AROS_TARGET_ARCH)$(AROS_TARGET_SUFFIX)-aros-gcc \
157 $(TOOLDIR)/$(AROS_TARGET_CPU)-$(AROS_TARGET_ARCH)$(AROS_TARGET_SUFFIX)-aros-ld \
158 $(GENDIR)/scripts/genshared $(TOOLDIR)/genmf.py \
159 tools/adflib/myconf.aros tools/collect-aros/env.h
161 # Clean the sources and tools
162 arch-clean: clean
163 @$(NOP)
165 # Really clean all - like a clean checkout
166 dist-clean: arch-clean
167 @$(NOP)
169 # Dependencies don't work with .DEFAULT :-(
170 docs : tools
171 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.docs
173 all-docs : tools
174 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.all-docs
176 # Don't try to generate $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts
177 $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts:
178 @$(NOP)
180 # targets which do not generate files or for which a file/directory exists
181 .PHONY: default all makedirs tools crosstools docs clean arch-clean dist-clean install \
182 $(TOP)/bin/$(AROS_TARGET_ARCH)-$(AROS_TARGET_CPU)$(AROS_TARGET_SUFFIX)/gen/config/make.opts \
183 test kernel boot workbench compiler contrib sdk mmake query
185 # Workaround for bug in make v3.81 (should normally be handled by .DEFAULT)
186 install test kernel boot workbench compiler contrib sdk : crosstools
187 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$@
189 # Bypass crosstools target.
190 query : tools
191 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$@
193 # Map MetaTargets to make targets : Call mmake with AROS.target
194 # This does not allow to check for dependancies, so it is not suitable for
195 # Calling standard main targets, but is usable as a shortcut for MetaMake
196 # if it was not installed globally
197 .DEFAULT :
198 @$(MAKE) $(MKARGS) crosstools
199 @+$(CALL) $(MMAKE) $(MMAKE_OPTIONS) AROS.$@