use the -newos toolchain even if -elf is present.
[newos.git] / makefile
blob15987f4480ff0531b5b58202f235ff62564a4ce2
1 ifneq ($(SECOND_CALL),true)
3 # if this is the top level instantiation of make, call back into itself with
4 # the implicit rules option turned off. There has to be a simpler way
5 # to do this, but I havne't figured it out.
6 MKFLAGS := -r
8 .PHONY: all
9 all:
10 @SECOND_CALL=true $(MAKE) $(MKFLAGS) -f makefile
13 @SECOND_CALL=true $(MAKE) $(MKFLAGS) -f makefile $@
15 else
17 ifeq ($(MAKEFILE_LIST),)
18 $(warning This build system requires the MAKEFILE_LIST feature,)
19 $(warning which was added to GNU make in version 3.80.)
20 $(warning You are running $(MAKE_VERSION).)
21 $(error Required make feature missing)
22 endif
24 # figures out the system
25 include make.syscfg
27 # include top level macros
28 include macros.mk
30 # sub-makefiles have to fill these in
31 ALL_DEPS =
32 CLEAN =
33 FINAL =
34 TOOLS =
35 ALL_OBJS =
37 FINAL := $(call TOBUILDDIR, final)
38 #$(warning FINAL = $(FINAL))
40 final: $(FINAL)
42 # includes the config of the build
43 include config/make.config
45 include apps/makefile
46 include kernel/makefile
47 include kernel/addons/makefile
48 include tools/makefile
49 include lib/makefile
50 include boot/$(PLATFORM)/makefile
52 clean: $(CLEAN)
53 rm -f $(ALL_OBJS)
54 rm -f $(ALL)
55 rm -f $(FINAL)
57 depsclean:
58 rm -f $(ALL_DEPS)
60 appsclean:
61 rm -rf $(APPS_BUILD_DIR)
63 allclean: depsclean clean
64 rm -f $(TOOLS)
66 spotless:
67 rm -rf $(BUILD_DIR)
69 #$(warning ALL_OBJS = $(ALL_OBJS))
70 #$(warning ALL_DEPS = $(ALL_DEPS))
72 ifeq ($(filter $(MAKECMDGOALS), allclean), )
73 -include $(ALL_DEPS)
74 endif
76 endif