1 # Main makefile for AROS
2 # Copyright (C) 2000 AROS - The Amiga Research OS
8 include $(TOP
)/config
/make.cfg
10 all: makedirs tools mmake
15 @
$(FOR
) dir in
$(AROSDIR
) $(GENDIR
) $(TOOLDIR
) ; do \
16 $(IF
) [ ! -d
$$dir ]; then \
17 $(MECHO
) $(MKDIR
) "$$dir" ; \
21 @
$(IF
) [ ! -f
$(AROSDIR
)/.gdbinit
]; then \
22 $(CP
) $(TOP
)/_gdbinit
$(AROSDIR
)/.gdbinit
; \
25 # Create the tools that are used to build AROS.
26 tools
: makedirs
$(TOOLLIB
) $(GENMF
) $(MODTOOL
) $(CPAK
) $(ARCHTOOL
) $(FLEXCAT
) $(GENSKELETON
) $(CREATEDTDESC
)
28 $(TOOLLIB
) : $(wildcard $(TOP
)/tools
/toollib
/*.
[ch
])
29 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/toollib TOP
=$(TOP
)
31 $(GENMF
) : $(TOP
)/tools
/genmf
/genmf.c
32 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/genmf TOP
=$(TOP
)
34 $(MODTOOL
) : $(TOOLLIB
) $(wildcard $(TOP
)/tools
/modtool
/*.
[ch
])
35 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/modtool TOP
=$(TOP
)
37 $(CPAK
) : $(TOP
)/tools
/cpak
/cpak.c
38 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/cpak TOP
=$(TOP
)
40 $(ARCHTOOL
) : $(TOP
)/tools
/archtools
/archtool.c
41 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/archtools TOP
=$(TOP
)
43 $(FLEXCAT
) : $(TOP
)/tools
/FlexCat
/flexcat.c
44 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/FlexCat TOP
=$(TOP
)
46 $(GENSKELETON
) : $(TOP
)/tools
/genskeleton
/genskeleton.c
47 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/genskeleton TOP
=$(TOP
)
49 $(CREATEDTDESC
) : $(wildcard $(TOP
)/tools
/dtdesc
/*.
[ch
]) $(wildcard $(TOP
)/tools
/dtdesc
/c_iff
/*.
[ch
])
50 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/dtdesc
-f Makefile.aros TOP
=$(TOP
)
52 # MetaMake apparently requires a slighty different compilation. Probably
53 # because it is sort-of an external package as well.
55 mmake
: $(TOP
)/tools
/MetaMake
/Makefile
$(MMAKE
)
57 $(TOP
)/tools
/MetaMake
/configure
: $(TOP
)/tools
/MetaMake
/configure.in
58 cd
$(TOP
)/tools
/MetaMake
; autoconf
60 $(TOP
)/tools
/MetaMake
/Makefile.in
: $(TOP
)/tools
/MetaMake
/Makefile.am
61 cd
$(TOP
)/tools
/MetaMake
; automake
63 $(TOP
)/tools
/MetaMake
/Makefile
: $(TOP
)/tools
/MetaMake
/configure \
64 $(TOP
)/tools
/MetaMake
/Makefile.in
65 cd
$(TOP
)/tools
/MetaMake
; .
/configure
--prefix=$(TOOLDIR
)
67 $(MMAKE
): $(TOP
)/tools
/MetaMake
/mmake.c
$(GENMF
)
68 $(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/MetaMake
69 cp
$(TOP
)/tools
/MetaMake
/mmake
$(HOST_EXE_SUFFIX
) $(MMAKE
)
75 # Clean the sources and tools
77 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/MetaMake
clean
78 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/FlexCat
clean
79 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/archtools
clean
80 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/cpak
clean
81 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/genmf
clean
82 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/toollib
clean
83 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/genskeleton
clean
84 @
$(MAKE
) $(MKARGS
) -C
$(TOP
)/tools
/dtdesc
-f Makefile.aros
clean
86 # Really clean all - like a clean checkout
87 dist-clean
: arch-clean
88 @
$(RM
) Makefile configure config.
* make.defaults make.opts \
89 mmake.cache mmake.config
91 # Dependencies don't work with .DEFAULT :-(
92 docs
: makedirs tools mmake
95 all-docs
: makedirs tools mmake
96 @
$(MMAKE
) AROS.all-docs
98 install : makedirs tools mmake
99 @
$(MMAKE
) AROS.
install
101 # Don't try to generate $(TOP)/make.opts
105 # targets which do not generate files or for which a file/directory exists
106 .PHONY
: default
all makedirs tools docs
clean arch-clean dist-clean \
107 install $(TOP
)/make.opts
test workbench rom compiler contrib
109 # Map MetaTargets to make targets : Call mmake with AROS.target
110 # This does not allow to check for dependancies, so it is not suitable for
111 # Calling standard main targets, but is usable as a shortcut for MetaMake
112 # if it was not installed globally