1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 02:37:36 +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,8 +1,8 @@
include ../../Makefile.common
OBJS = \
main.o
APP = About
PROGRAM = About
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,8 +1,8 @@
include ../../Makefile.common
OBJS = \
main.o
APP = Browser
PROGRAM = Browser
include ../Makefile.common
LDFLAGS = -lgui -lhtml -ldraw -lprotocol -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,11 +1,11 @@
include ../../Makefile.common
OBJS = \
Calculator.o \
Keypad.o \
CalculatorWidget.o \
main.o
Calculator.o \
Keypad.o \
CalculatorWidget.o \
main.o
APP = Calculator
PROGRAM = Calculator
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,10 +1,10 @@
include ../../Makefile.common
OBJS = \
ThreadCatalogModel.o \
BoardListModel.o \
main.o
APP = ChanViewer
PROGRAM = ChanViewer
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,9 +1,9 @@
include ../../Makefile.common
OBJS = \
DisplayProperties.o \
main.o \
APP = DisplayProperties
PROGRAM = DisplayProperties
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,11 +1,11 @@
include ../../Makefile.common
OBJS = \
DirectoryView.o \
FileUtils.o \
PropertiesDialog.o \
PropertiesDialog.o \
main.o
APP = FileManager
PROGRAM = FileManager
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,17 +1,18 @@
include ../../Makefile.common
OBJS = \
FontEditor.o \
GlyphMapWidget.o \
GlyphEditorWidget.o \
main.o
APP = FontEditor
PROGRAM = FontEditor
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
FontEditor.cpp: UI_FontEditorBottom.h
UI_FontEditorBottom.h: FontEditorBottom.frm
../../DevTools/FormCompiler/FormCompiler $< > $@
EXTRA_CLEAN = UI_FontEditorBottom.h
include ../../Makefile.common

View file

@ -1,5 +1,3 @@
include ../../Makefile.common
OBJS = \
ManualModel.o \
ManualSectionNode.o \
@ -7,6 +5,8 @@ OBJS = \
History.o \
main.o
APP = Help
PROGRAM = Help
include ../Makefile.common
LDFLAGS = -lgui -lhtml -lmarkdown -ldraw -lipc -lprotocol -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,10 +1,10 @@
include ../../Makefile.common
OBJS = \
HexEditor.o \
HexEditor.o \
HexEditorWidget.o \
main.o
main.o
APP = HexEditor
PROGRAM = HexEditor
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,5 +1,3 @@
include ../../Makefile.common
OBJS = \
IRCClient.o \
IRCChannel.o \
@ -11,6 +9,8 @@ OBJS = \
IRCChannelMemberListModel.o \
main.o
APP = IRCClient
PROGRAM = IRCClient
include ../Makefile.common
LDFLAGS = -lgui -lhtml -ldraw -lprotocol -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

3
Applications/Makefile Normal file
View file

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

View file

@ -1,14 +0,0 @@
DEFINES += -DUSERLAND
all: $(APP)
$(APP): $(OBJS)
$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lmarkdown -lhtml -laudio -lipc -lvt -lpcidb -lgui -ldraw -lprotocol -lipc -lthread -lpthread -lcore -lc
.cpp.o:
@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<
-include $(OBJS:%.o=%.d)
clean:
@echo "CLEAN"; rm -f $(APP) $(OBJS) *.d

View file

@ -1,5 +1,3 @@
include ../../Makefile.common
OBJS = \
PaintableWidget.o \
PaletteWidget.o \
@ -14,6 +12,8 @@ OBJS = \
PickerTool.o \
main.o
APP = PaintBrush
PROGRAM = PaintBrush
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,9 +1,9 @@
include ../../Makefile.common
OBJS = \
PianoWidget.o \
main.o
APP = Piano
PROGRAM = Piano
include ../Makefile.common
LDFLAGS = -lgui -ldraw -laudio -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,9 +1,9 @@
include ../../Makefile.common
OBJS = \
QSWidget.o \
main.o
APP = QuickShow
PROGRAM = QuickShow
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lprotocol -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,11 +1,11 @@
include ../../Makefile.common
OBJS = \
PlaybackManager.o \
PlaybackManager.o \
SampleWidget.o \
SoundPlayerWidget.o \
SoundPlayerWidget.o \
main.o
APP = SoundPlayer
PROGRAM = SoundPlayer
include ../Makefile.common
LDFLAGS = -lgui -ldraw -laudio -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,8 +1,8 @@
include ../../Makefile.common
OBJS = \
main.o
APP = SystemDialog
PROGRAM = SystemDialog
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,5 +1,3 @@
include ../../Makefile.common
OBJS = \
ProcessModel.o \
DevicesModel.o \
@ -12,6 +10,8 @@ OBJS = \
NetworkStatisticsWidget.o \
main.o
APP = SystemMonitor
PROGRAM = SystemMonitor
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lprotocol -lpcidb -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,11 +1,11 @@
include ../../Makefile.common
OBJS = \
TaskbarWindow.o \
TaskbarButton.o \
WindowList.o \
main.o
APP = Taskbar
PROGRAM = Taskbar
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,8 +1,8 @@
include ../../Makefile.common
OBJS = \
main.o
APP = Terminal
PROGRAM = Terminal
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lvt -lprotocol -lipc -lcore -lc
include ../../Makefile.common

View file

@ -1,9 +1,9 @@
include ../../Makefile.common
OBJS = \
TextEditorWidget.o \
main.o
main.o
APP = TextEditor
PROGRAM = TextEditor
include ../Makefile.common
LDFLAGS = -lgui -ldraw -lvt -lipc -lthread -lpthread -lcore -lc
include ../../Makefile.common

View file

@ -1,14 +1,14 @@
include ../../Makefile.common
OBJS = \
main.o \
TextWidget.o \
background.png.o
APP = Welcome
PROGRAM = Welcome
LDFLAGS = -lgui -ldraw -lipc -lcore -lc
.SUFFIXES: .png
%.png.o: %.png
@echo "LINK $<"; $(LINK) --relocatable --format binary --output $@ $<
include ../Makefile.common
include ../../Makefile.common