From ac25438d54252d70de0002e4cca04ac258967c47 Mon Sep 17 00:00:00 2001 From: joshua stein Date: Wed, 18 Dec 2019 17:35:46 -0600 Subject: Build: clean up build system, use one shared Makefile Allow everything to be built from the top level directory with just 'make', cleaned with 'make clean', and installed with 'make install'. Also support these in any particular subdirectory. Specifying 'make VERBOSE=1' will print each ld/g++/etc. command as it runs. Kernel and early host tools (IPCCompiler, etc.) are built as object.host.o so that they don't conflict with other things built with the cross-compiler. --- Demos/HelloWorld2/Makefile | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'Demos/HelloWorld2') diff --git a/Demos/HelloWorld2/Makefile b/Demos/HelloWorld2/Makefile index aa09fc2707..cc3904e8d9 100644 --- a/Demos/HelloWorld2/Makefile +++ b/Demos/HelloWorld2/Makefile @@ -1,27 +1,13 @@ -include ../../Makefile.common - OBJS = \ main.o -APP = HelloWorld2 +PROGRAM = HelloWorld2 -DEFINES += -DUSERLAND - -all: $(APP) +LDFLAGS = -lgui -ldraw -lipc -lcore -lc main.cpp: UI_HelloWorld2.h UI_HelloWorld2.h: HelloWorld2.frm ../../DevTools/FormCompiler/FormCompiler $< > $@ -$(APP): $(OBJS) - $(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lgui -ldraw -lipc -lcore -lc - -.cpp.o: - @echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $< - --include $(OBJS:%.o=%.d) - -clean: - @echo "CLEAN"; rm -f $(APP) $(OBJS) *.d - +include ../../Makefile.common -- cgit v1.2.3