1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:07:45 +00:00

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.
This commit is contained in:
joshua stein 2019-12-18 17:35:46 -06:00 committed by Andreas Kling
parent f4b2b72c8e
commit ac25438d54
92 changed files with 527 additions and 929 deletions

View file

@ -1,22 +1,8 @@
include ../../Makefile.common
OBJS = \
Fire.o
APP = Fire
PROGRAM = Fire
DEFINES += -DUSERLAND
all: $(APP)
$(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
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,22 +1,8 @@
include ../../Makefile.common
OBJS = \
main.o
APP = HelloWorld
PROGRAM = HelloWorld
DEFINES += -DUSERLAND
all: $(APP)
$(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
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common

View file

@ -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

3
Demos/Makefile Normal file
View file

@ -0,0 +1,3 @@
SUBDIRS := $(wildcard */.)
include ../Makefile.subdir

View file

@ -1,22 +1,8 @@
include ../../Makefile.common
OBJS = \
main.o
APP = WidgetGallery
PROGRAM = WidgetGallery
DEFINES += -DUSERLAND
all: $(APP)
$(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
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common