diff options
author | Sergey Bugaev <bugaevc@serenityos.org> | 2020-05-06 18:40:06 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-14 20:15:18 +0200 |
commit | 450a2a0f9ce2443bc06445ee018c9860d8cd5fc8 (patch) | |
tree | c124a612ef259b764855af5e33c39e0d09ad4df2 | |
parent | 49727ffee424d8c0038ce18b91b0bf0ff33b1a4d (diff) | |
download | serenity-450a2a0f9ce2443bc06445ee018c9860d8cd5fc8.zip |
Build: Switch to CMake :^)
Closes https://github.com/SerenityOS/serenity/issues/2080
236 files changed, 1774 insertions, 2337 deletions
diff --git a/.gitignore b/.gitignore index 6c2cfb8d36..f09e79270f 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,9 @@ *.cxxflags *.autosave Meta/Lagom/build -Root +Build +build +CMakeFiles Toolchain/Tarballs Toolchain/Build Toolchain/Local diff --git a/.travis.yml b/.travis.yml index b0b1876e9f..cb1e607880 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ os: linux -dist: xenial +dist: bionic language: cpp @@ -23,20 +23,26 @@ notifications: before_install: - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update -qq -- sudo apt-get install -y g++-8 libstdc++-8-dev cmake shellcheck libmpfr-dev libmpc-dev libgmp-dev e2fsprogs qemu-system-i386 qemu-utils +- sudo apt-get install -y g++-8 libstdc++-8-dev shellcheck libmpfr-dev libmpc-dev libgmp-dev e2fsprogs qemu-system-i386 qemu-utils - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90 +- sudo python2 -m pip install cmake +- export PATH=/usr/local/bin/:$PATH +- cmake --version script: - export SERENITY_ROOT=$(pwd) +- Meta/lint-shell-scripts.sh +- Meta/check-license-headers.sh - cd Toolchain - TRY_USE_LOCAL_TOOLCHAIN=y ./BuildIt.sh -- cd ../Kernel -- ./makeall.sh -- ../Meta/lint-shell-scripts.sh -- ../Meta/check-license-headers.sh -- ../Meta/Lagom/build-js.sh -- cd ../Libraries/LibJS/Tests -- ./run-tests -- cd ../../../Toolchain/Cache +- cd "$SERENITY_ROOT" +- mkdir -p Build +- cd Build +- cmake .. -DBUILD_LAGOM=1 +- make +- make test +- cd "$SERENITY_ROOT"/Libraries/LibJS/Tests +- ./run-tests.sh +- cd "$SERENITY_ROOT"/Toolchain/Cache - du -ch * || true diff --git a/AK/Makefile b/AK/Makefile deleted file mode 100644 index 27ac225b0e..0000000000 --- a/AK/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/AK/ - cp ../AK/*.h $(SERENITY_BASE_DIR)/Root/usr/include/AK/ - -include ../Makefile.common diff --git a/AK/Tests/CMakeLists.txt b/AK/Tests/CMakeLists.txt new file mode 100644 index 0000000000..040abb47b7 --- /dev/null +++ b/AK/Tests/CMakeLists.txt @@ -0,0 +1,12 @@ +file(GLOB AK_TEST_SOURCES "*.cpp") + +foreach(source ${AK_TEST_SOURCES}) + get_filename_component(name ${source} NAME_WE) + add_executable(${name} ${source}) + target_link_libraries(${name} LagomCore) + add_test( + NAME ${name} + COMMAND ${name} + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} + ) +endforeach() diff --git a/AK/Tests/Makefile b/AK/Tests/Makefile deleted file mode 100644 index ec38a5ba61..0000000000 --- a/AK/Tests/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -SHARED_TEST_SOURCES = \ - ../String.cpp \ - ../StringImpl.cpp \ - ../StringBuilder.cpp \ - ../StringView.cpp \ - ../StringUtils.cpp \ - ../LogStream.cpp \ - ../JsonValue.cpp \ - ../JsonParser.cpp \ - ../FlyString.cpp \ - ../FileSystemPath.cpp \ - ../URL.cpp \ - ../Utf8View.cpp - -SRCS = $(wildcard *.cpp) -SHARED_TEST_OBJS = ${SHARED_TEST_SOURCES:.cpp=.host.o} -OBJS = ${SRCS:.cpp=.host.o} $(SHARED_TEST_OBJS) -APPS = ${SRCS:.cpp=} - -EXTRA_CLEAN = $(APPS) *.o ../*.host.o - -USE_HOST_CXX = 1 - -include ../../Makefile.common - -CXXFLAGS = -std=c++17 -Wall -Wextra -ggdb3 -O2 -I../ -I../../ - -APPS_RUN = $(addsuffix .run,$(APPS)) -test: $(APPS) $(APPS_RUN) -$(APPS_RUN): %.run: - ./$* - -$(APPS): %: %$(OBJ_SUFFIX).o $(SHARED_TEST_OBJS) - @echo "LINK $@" - $(QUIET) $(CXX) -o $@ $< $(SHARED_TEST_OBJS) $(LDFLAGS) - -all: | $(APPS) $(APPS_RUN) diff --git a/Applications/About/CMakeLists.txt b/Applications/About/CMakeLists.txt new file mode 100644 index 0000000000..0b3023c819 --- /dev/null +++ b/Applications/About/CMakeLists.txt @@ -0,0 +1,12 @@ +set(SOURCES + main.cpp +) + +execute_process(COMMAND "git rev-parse --short HEAD" OUTPUT_VARIABLE GIT_COMMIT) +execute_process(COMMAND "git rev-parse --abbrev-ref HEAD" OUTPUT_VARIABLE GIT_BRANCH) +execute_process(COMMAND "git diff-index --quiet HEAD -- && echo tracked || echo untracked" OUTPUT_VARIABLE GIT_CHANGES) + +add_definitions(-DGIT_COMMIT="${GIT_COMMIT}" -DGIT_BRANCH="${GIT_BRANCH}" -DGIT_CHANGES="${GIT_CHANGES}") + +serenity_bin(About) +target_link_libraries(About LibGUI) diff --git a/Applications/About/Makefile b/Applications/About/Makefile deleted file mode 100644 index 4745b70e23..0000000000 --- a/Applications/About/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = About - -LIB_DEPS = GUI Gfx IPC Core - -DEFINES += -DGIT_COMMIT=\"`git rev-parse --short HEAD`\" -DGIT_BRANCH=\"`git rev-parse --abbrev-ref HEAD`\" - -include ../../Makefile.common diff --git a/Applications/Browser/CMakeLists.txt b/Applications/Browser/CMakeLists.txt new file mode 100644 index 0000000000..a75572ccde --- /dev/null +++ b/Applications/Browser/CMakeLists.txt @@ -0,0 +1,11 @@ +set(SOURCES + BookmarksBarWidget.cpp + DownloadWidget.cpp + InspectorWidget.cpp + main.cpp + Tab.cpp + WindowActions.cpp +) + +serenity_bin(Browser) +target_link_libraries(Browser LibWeb LibProtocol LibGUI) diff --git a/Applications/Browser/Makefile b/Applications/Browser/Makefile deleted file mode 100644 index 6f53cb01d9..0000000000 --- a/Applications/Browser/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -OBJS = \ - BookmarksBarWidget.o \ - DownloadWidget.o \ - InspectorWidget.o \ - Tab.o \ - WindowActions.o \ - main.o - -PROGRAM = Browser - -LIB_DEPS = Web JS Markdown TextCodec GUI Gfx IPC Protocol Core - -main.cpp: ../../Libraries/LibWeb/CSS/PropertyID.h -../../Libraries/LibWeb/CSS/PropertyID.h: - @flock ../../Libraries/LibWeb $(MAKE) -C ../../Libraries/LibWeb - -main.cpp: ../../Services/ProtocolServer/ProtocolClientEndpoint.h -../../Services/ProtocolServer/ProtocolClientEndpoint.h: - @flock ../../Services/ProtocolServer $(MAKE) -C $(dir $(@)) - -include ../../Makefile.common diff --git a/Applications/CMakeLists.txt b/Applications/CMakeLists.txt new file mode 100644 index 0000000000..c7a1828b85 --- /dev/null +++ b/Applications/CMakeLists.txt @@ -0,0 +1,19 @@ +add_subdirectory(About) +add_subdirectory(Browser) +add_subdirectory(Calculator) +add_subdirectory(Calendar) +add_subdirectory(Debugger) +add_subdirectory(DisplaySettings) +add_subdirectory(FileManager) +add_subdirectory(FontEditor) +add_subdirectory(Help) +add_subdirectory(HexEditor) +add_subdirectory(IRCClient) +add_subdirectory(PaintBrush) +add_subdirectory(Piano) +add_subdirectory(QuickShow) +add_subdirectory(SoundPlayer) +add_subdirectory(SystemMonitor) +add_subdirectory(Terminal) +add_subdirectory(TextEditor) +add_subdirectory(Welcome) diff --git a/Applications/Calculator/CMakeLists.txt b/Applications/Calculator/CMakeLists.txt new file mode 100644 index 0000000000..548c37b774 --- /dev/null +++ b/Applications/Calculator/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + main.cpp + Calculator.cpp + CalculatorWidget.cpp + Keypad.cpp +) + +serenity_bin(Calculator) +target_link_libraries(Calculator LibGUI) diff --git a/Applications/Calculator/Makefile b/Applications/Calculator/Makefile deleted file mode 100644 index 05ab47eb2d..0000000000 --- a/Applications/Calculator/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - Calculator.o \ - Keypad.o \ - CalculatorWidget.o \ - main.o - -PROGRAM = Calculator - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/Applications/Calendar/CMakeLists.txt b/Applications/Calendar/CMakeLists.txt new file mode 100644 index 0000000000..d08fb39f3f --- /dev/null +++ b/Applications/Calendar/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + AddEventDialog.cpp + Calendar.cpp + CalendarWidget.cpp + main.cpp +) + +serenity_bin(Calendar) +target_link_libraries(Calendar LibGUI) diff --git a/Applications/Calendar/Makefile b/Applications/Calendar/Makefile deleted file mode 100644 index 9e8444cb37..0000000000 --- a/Applications/Calendar/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = \ - Calendar.o \ - CalendarWidget.o \ - AddEventDialog.o \ - main.o - -PROGRAM = Calendar - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common - diff --git a/Applications/Debugger/CMakeLists.txt b/Applications/Debugger/CMakeLists.txt new file mode 100644 index 0000000000..7e6f200ea4 --- /dev/null +++ b/Applications/Debugger/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(Debugger) +target_link_libraries(Debugger LibCore LibDebug LibX86 LibLine) diff --git a/Applications/Debugger/Makefile b/Applications/Debugger/Makefile deleted file mode 100644 index c03aec4ed3..0000000000 --- a/Applications/Debugger/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = Debugger - -LIB_DEPS = Core X86 Debug Line - -include ../../Makefile.common diff --git a/Applications/DisplaySettings/CMakeLists.txt b/Applications/DisplaySettings/CMakeLists.txt new file mode 100644 index 0000000000..b5d2162f9d --- /dev/null +++ b/Applications/DisplaySettings/CMakeLists.txt @@ -0,0 +1,8 @@ +set(SOURCES + DisplaySettings.cpp + main.cpp + MonitorWidget.cpp +) + +serenity_bin(DisplaySettings) +target_link_libraries(DisplaySettings LibGUI) diff --git a/Applications/DisplaySettings/Makefile b/Applications/DisplaySettings/Makefile deleted file mode 100644 index 60d1ed6f49..0000000000 --- a/Applications/DisplaySettings/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJS = \ - MonitorWidget.o \ - DisplaySettings.o \ - main.o \ - -PROGRAM = DisplaySettings - -LIB_DEPS = GUI Gfx IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/FileManager/CMakeLists.txt b/Applications/FileManager/CMakeLists.txt new file mode 100644 index 0000000000..d54efc046c --- /dev/null +++ b/Applications/FileManager/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + DirectoryView.cpp + FileUtils.cpp + main.cpp + PropertiesDialog.cpp +) + +serenity_bin(FileManager) +target_link_libraries(FileManager LibGUI LibDesktop) diff --git a/Applications/FileManager/Makefile b/Applications/FileManager/Makefile deleted file mode 100644 index 1a7e4bc7a9..0000000000 --- a/Applications/FileManager/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - DirectoryView.o \ - FileUtils.o \ - PropertiesDialog.o \ - main.o - -PROGRAM = FileManager - -LIB_DEPS = GUI Gfx Desktop IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/FontEditor/CMakeLists.txt b/Applications/FontEditor/CMakeLists.txt new file mode 100644 index 0000000000..0c39433507 --- /dev/null +++ b/Applications/FontEditor/CMakeLists.txt @@ -0,0 +1,11 @@ +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +set(SOURCES + FontEditor.cpp + GlyphEditorWidget.cpp + GlyphMapWidget.cpp + main.cpp +) + +serenity_bin(FontEditor) +target_link_libraries(FontEditor LibGUI LibGfx) diff --git a/Applications/FontEditor/Makefile b/Applications/FontEditor/Makefile deleted file mode 100644 index 20b620b202..0000000000 --- a/Applications/FontEditor/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - FontEditor.o \ - GlyphMapWidget.o \ - GlyphEditorWidget.o \ - main.o - -PROGRAM = FontEditor - -LIB_DEPS = GUI Gfx Core IPC - -include ../../Makefile.common diff --git a/Applications/Help/CMakeLists.txt b/Applications/Help/CMakeLists.txt new file mode 100644 index 0000000000..71bed8e51b --- /dev/null +++ b/Applications/Help/CMakeLists.txt @@ -0,0 +1,10 @@ +set(SOURCES + History.cpp + main.cpp + ManualModel.cpp + ManualPageNode.cpp + ManualSectionNode.cpp +) + +serenity_bin(Help) +target_link_libraries(Help LibWeb LibMarkdown LibGUI) diff --git a/Applications/Help/Makefile b/Applications/Help/Makefile deleted file mode 100644 index d1b1159f5f..0000000000 --- a/Applications/Help/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = \ - ManualModel.o \ - ManualSectionNode.o \ - ManualPageNode.o \ - History.o \ - main.o - -PROGRAM = Help - -LIB_DEPS = GUI Web TextCodec JS Gfx Markdown IPC Protocol Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/HexEditor/CMakeLists.txt b/Applications/HexEditor/CMakeLists.txt new file mode 100644 index 0000000000..3de7c9cfb5 --- /dev/null +++ b/Applications/HexEditor/CMakeLists.txt @@ -0,0 +1,8 @@ +set(SOURCES + HexEditor.cpp + HexEditorWidget.cpp + main.cpp +) + +serenity_bin(HexEditor) +target_link_libraries(HexEditor LibGUI) diff --git a/Applications/HexEditor/Makefile b/Applications/HexEditor/Makefile deleted file mode 100644 index 8231655955..0000000000 --- a/Applications/HexEditor/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJS = \ - HexEditor.o \ - HexEditorWidget.o \ - main.o - -PROGRAM = HexEditor - -LIB_DEPS = GUI Gfx IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/IRCClient/CMakeLists.txt b/Applications/IRCClient/CMakeLists.txt new file mode 100644 index 0000000000..6f304b18c1 --- /dev/null +++ b/Applications/IRCClient/CMakeLists.txt @@ -0,0 +1,14 @@ +set(SOURCES + IRCAppWindow.cpp + IRCChannel.cpp + IRCChannelMemberListModel.cpp + IRCClient.cpp + IRCLogBuffer.cpp + IRCQuery.cpp + IRCWindow.cpp + IRCWindowListModel.cpp + main.cpp +) + +serenity_bin(IRCClient) +target_link_libraries(IRCClient LibWeb LibGUI) diff --git a/Applications/IRCClient/Makefile b/Applications/IRCClient/Makefile deleted file mode 100644 index 85cacc569b..0000000000 --- a/Applications/IRCClient/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -OBJS = \ - IRCClient.o \ - IRCChannel.o \ - IRCQuery.o \ - IRCLogBuffer.o \ - IRCAppWindow.o \ - IRCWindow.o \ - IRCWindowListModel.o \ - IRCChannelMemberListModel.o \ - main.o - -PROGRAM = IRCClient - -LIB_DEPS = Web TextCodec JS Markdown GUI Gfx Protocol IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/Makefile b/Applications/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/Applications/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/Applications/PaintBrush/CMakeLists.txt b/Applications/PaintBrush/CMakeLists.txt new file mode 100644 index 0000000000..bebff13c68 --- /dev/null +++ b/Applications/PaintBrush/CMakeLists.txt @@ -0,0 +1,23 @@ +set(SOURCES + BucketTool.cpp + CreateNewLayerDialog.cpp + EllipseTool.cpp + EraseTool.cpp + Image.cpp + ImageEditor.cpp + Layer.cpp + LayerModel.cpp + LineTool.cpp + main.cpp + MoveTool.cpp + PaletteWidget.cpp + PenTool.cpp + PickerTool.cpp + RectangleTool.cpp + SprayTool.cpp + ToolboxWidget.cpp + Tool.cpp +) + +serenity_bin(PaintBrush) +target_link_libraries(PaintBrush LibGUI LibGfx) diff --git a/Applications/PaintBrush/Makefile b/Applications/PaintBrush/Makefile deleted file mode 100644 index 54cec5e315..0000000000 --- a/Applications/PaintBrush/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -OBJS = \ - BucketTool.o \ - CreateNewLayerDialog.o \ - EllipseTool.o \ - EraseTool.o \ - Image.o \ - ImageEditor.o \ - Layer.o \ - LayerModel.o \ - LineTool.o \ - MoveTool.o \ - PaletteWidget.o \ - PenTool.o \ - PickerTool.o \ - RectangleTool.o \ - SprayTool.o \ - Tool.o \ - ToolboxWidget.o \ - main.o - -PROGRAM = PaintBrush - -LIB_DEPS = GUI Gfx IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/Piano/CMakeLists.txt b/Applications/Piano/CMakeLists.txt new file mode 100644 index 0000000000..0ba5a8ce91 --- /dev/null +++ b/Applications/Piano/CMakeLists.txt @@ -0,0 +1,13 @@ +set(SOURCES + AudioEngine.cpp + KeysWidget.cpp + KnobsWidget.cpp + main.cpp + MainWidget.cpp + RollWidget.cpp + SamplerWidget.cpp + WaveWidget.cpp +) + +serenity_bin(Piano) +target_link_libraries(Piano LibAudio LibGUI) diff --git a/Applications/Piano/Makefile b/Applications/Piano/Makefile deleted file mode 100644 index aadbd615de..0000000000 --- a/Applications/Piano/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -OBJS = \ - AudioEngine.o \ - MainWidget.o \ - WaveWidget.o \ - RollWidget.o \ - SamplerWidget.o \ - KeysWidget.o \ - KnobsWidget.o \ - main.o - -PROGRAM = Piano - -LIB_DEPS = GUI Gfx Audio IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/QuickShow/CMakeLists.txt b/Applications/QuickShow/CMakeLists.txt new file mode 100644 index 0000000000..c0f9a05e6b --- /dev/null +++ b/Applications/QuickShow/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + QSWidget.cpp +) + +serenity_bin(QuickShow) +target_link_libraries(QuickShow LibGUI LibGfx) diff --git a/Applications/QuickShow/Makefile b/Applications/QuickShow/Makefile deleted file mode 100644 index c77b2eade3..0000000000 --- a/Applications/QuickShow/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - QSWidget.o \ - main.o - -PROGRAM = QuickShow - -LIB_DEPS = GUI Gfx Protocol IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/SoundPlayer/CMakeLists.txt b/Applications/SoundPlayer/CMakeLists.txt new file mode 100644 index 0000000000..6c71842cd3 --- /dev/null +++ b/Applications/SoundPlayer/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + main.cpp + PlaybackManager.cpp + SampleWidget.cpp + SoundPlayerWidget.cpp +) + +serenity_bin(SoundPlayer) +target_link_libraries(SoundPlayer LibAudio LibGUI) diff --git a/Applications/SoundPlayer/Makefile b/Applications/SoundPlayer/Makefile deleted file mode 100644 index 2d0bc01f50..0000000000 --- a/Applications/SoundPlayer/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - PlaybackManager.o \ - SampleWidget.o \ - SoundPlayerWidget.o \ - main.o - -PROGRAM = SoundPlayer - -LIB_DEPS = GUI Gfx Audio IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/SystemMonitor/CMakeLists.txt b/Applications/SystemMonitor/CMakeLists.txt new file mode 100644 index 0000000000..03fcfd61ad --- /dev/null +++ b/Applications/SystemMonitor/CMakeLists.txt @@ -0,0 +1,16 @@ +set(SOURCES + DevicesModel.cpp + GraphWidget.cpp + main.cpp + MemoryStatsWidget.cpp + NetworkStatisticsWidget.cpp + ProcessFileDescriptorMapWidget.cpp + ProcessMemoryMapWidget.cpp + ProcessModel.cpp + ProcessStacksWidget.cpp + ProcessTableView.cpp + ProcessUnveiledPathsWidget.cpp +) + +serenity_bin(SystemMonitor) +target_link_libraries(SystemMonitor LibGUI LibPCIDB) diff --git a/Applications/SystemMonitor/Makefile b/Applications/SystemMonitor/Makefile deleted file mode 100644 index 99cd6f77c0..0000000000 --- a/Applications/SystemMonitor/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -OBJS = \ - ProcessModel.o \ - DevicesModel.o \ - ProcessTableView.o \ - MemoryStatsWidget.o \ - GraphWidget.o \ - ProcessStacksWidget.o \ - ProcessMemoryMapWidget.o \ - ProcessFileDescriptorMapWidget.o \ - NetworkStatisticsWidget.o \ - ProcessUnveiledPathsWidget.o \ - main.o - -PROGRAM = SystemMonitor - -LIB_DEPS = GUI Gfx Protocol PCIDB IPC Thread Pthread Core - -include ../../Makefile.common diff --git a/Applications/Terminal/CMakeLists.txt b/Applications/Terminal/CMakeLists.txt new file mode 100644 index 0000000000..c3a97c0886 --- /dev/null +++ b/Applications/Terminal/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(Terminal) +target_link_libraries(Terminal LibGUI LibVT) diff --git a/Applications/Terminal/Makefile b/Applications/Terminal/Makefile deleted file mode 100644 index b3deb0b3bf..0000000000 --- a/Applications/Terminal/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = Terminal - -LIB_DEPS = GUI Gfx VT Desktop IPC Protocol Core - -include ../../Makefile.common diff --git a/Applications/TextEditor/CMakeLists.txt b/Applications/TextEditor/CMakeLists.txt new file mode 100644 index 0000000000..6b3346edf3 --- /dev/null +++ b/Applications/TextEditor/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + TextEditorWidget.cpp +) + +serenity_bin(TextEditor) +target_link_libraries(TextEditor LibWeb LibMarkdown LibGUI) diff --git a/Applications/TextEditor/Makefile b/Applications/TextEditor/Makefile deleted file mode 100644 index 545526a16a..0000000000 --- a/Applications/TextEditor/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - TextEditorWidget.o \ - main.o - -PROGRAM = TextEditor - -LIB_DEPS = Web TextCodec Markdown GUI Gfx VT Protocol IPC Thread Pthread Core JS - -include ../../Makefile.common diff --git a/Applications/Welcome/CMakeLists.txt b/Applications/Welcome/CMakeLists.txt new file mode 100644 index 0000000000..e9d1ef3380 --- /dev/null +++ b/Applications/Welcome/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + BackgroundWidget.cpp + main.cpp + TextWidget.cpp + UnuncheckableButton.cpp +) + +serenity_bin(Welcome) +target_link_libraries(Welcome LibGUI) diff --git a/Applications/Welcome/Makefile b/Applications/Welcome/Makefile deleted file mode 100644 index 6fc8d97585..0000000000 --- a/Applications/Welcome/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - main.o \ - TextWidget.o \ - BackgroundWidget.o \ - UnuncheckableButton.o - -PROGRAM = Welcome - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000000..e6694db443 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,124 @@ +cmake_minimum_required (VERSION 3.17) +project (SerenityOS C CXX ASM) + +enable_testing() + +add_custom_target(image + COMMAND ${CMAKE_COMMAND} -E env "SERENITY_ROOT=${CMAKE_SOURCE_DIR}" ${CMAKE_SOURCE_DIR}/Meta/sync.sh + BYPRODUCTS ${CMAKE_BINARY_DIR}/_disk_image + USES_TERMINAL +) + +add_custom_target(run + COMMAND ${CMAKE_SOURCE_DIR}/Meta/run.sh + USES_TERMINAL +) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror -std=c++2a") + +include_directories(Libraries) +include_directories(.) + +add_subdirectory(Meta/Lagom) +add_subdirectory(DevTools/IPCCompiler) +add_subdirectory(DevTools/FormCompiler) +add_subdirectory(Libraries/LibWeb/CodeGenerators) +add_subdirectory(AK/Tests) + +function(serenity_lib_headers target_name) + file(GLOB_RECURSE headers RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h") + foreach(header ${headers}) + get_filename_component(subdirectory ${header} DIRECTORY) + install(FILES ${header} DESTINATION usr/include/${target_name}/${subdirectory}) + endforeach() +endfunction() + +function(serenity_lib target_name fs_name) + serenity_lib_headers(${target_name}) + add_library(${target_name} ${SOURCES} ${GENERATED_SOURCES}) + install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib) + set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name}) + if(DEFINED GENERATED_SOURCES) + set_source_files_properties(${GENERATED_SOURCES} PROPERTIES GENERATED 1) + foreach(generated ${GENERATED_SOURCES}) + get_filename_component(generated_name ${generated} NAME) + add_dependencies(${target_name} generate_${generated_name}) + endforeach() + endif() +endfunction() + +function(serenity_libc target_name fs_name) + serenity_lib_headers("") + add_library(${target_name} ${SOURCES}) + install(TARGETS ${target_name} ARCHIVE DESTINATION usr/lib) + set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${fs_name}) + target_link_directories(LibC PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +endfunction() + +function(serenity_bin target_name) + add_executable(${target_name} ${SOURCES}) + install(TARGETS ${target_name} RUNTIME DESTINATION bin) +endfunction() + +function(compile_ipc source output) + set(source ${CMAKE_CURRENT_SOURCE_DIR}/${source}) + add_custom_command( + OUTPUT ${output} + COMMAND IPCCompiler ${source} > ${output} + VERBATIM + DEPENDS IPCCompiler + MAIN_DEPENDENCY ${source} + ) + get_filename_component(output_name ${output} NAME) + add_custom_target(generate_${output_name} DEPENDS ${output}) +endfunction() + +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") +endif() + +unset(CMAKE_SYSROOT) +set(CMAKE_STAGING_PREFIX ${CMAKE_BINARY_DIR}/Root) +set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/Root) +set(CMAKE_INSTALL_DATAROOTDIR ${CMAKE_BINARY_DIR}/Root/res) + +set(TOOLCHAIN_PATH ${CMAKE_SOURCE_DIR}/Toolchain/Local/bin) +set(TOOLCHAIN_PREFIX ${TOOLCHAIN_PATH}/i686-pc-serenity-) + +set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc) +set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++) +set(CMAKE_ASM_COMPILER ${TOOLCHAIN_PREFIX}gcc) +set(CMAKE_LINKER ${TOOLCHAIN_PREFIX}ld) +set(CMAKE_RANLIB ${TOOLCHAIN_PREFIX}ranlib) +set(CMAKE_STRIP ${TOOLCHAIN_PREFIX}strip) +set(CMAKE_AR ${TOOLCHAIN_PREFIX}ar) + +#FIXME: -fstack-protector + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Os -Wno-sized-deallocation -fno-sized-deallocation -fno-exceptions -fno-rtti -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-nonnull-compare -Wno-deprecated-copy") + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDEBUG -DSANITIZE_PTRS") +add_link_options(--sysroot ${CMAKE_BINARY_DIR}/Root) + +if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wconsumed") +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-expansion-to-defined") +endif() + +include_directories(Libraries/LibC) +include_directories(Services) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/Services) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/Libraries) + +add_subdirectory(Kernel) +add_subdirectory(Libraries) +add_subdirectory(Services) +add_subdirectory(Applications) +add_subdirectory(Games) +add_subdirectory(DevTools) +add_subdirectory(MenuApplets) +add_subdirectory(Shell) +add_subdirectory(Demos) +add_subdirectory(Userland) diff --git a/Demos/CMakeLists.txt b/Demos/CMakeLists.txt new file mode 100644 index 0000000000..7a64474296 --- /dev/null +++ b/Demos/CMakeLists.txt @@ -0,0 +1,7 @@ +add_subdirectory(Cube) +add_subdirectory(DynamicLink) +add_subdirectory(Fire) +add_subdirectory(HelloWorld) +add_subdirectory(Mouse) +add_subdirectory(Screensaver) +add_subdirectory(WidgetGallery) diff --git a/Demos/Cube/CMakeLists.txt b/Demos/Cube/CMakeLists.txt new file mode 100644 index 0000000000..6a600aa789 --- /dev/null +++ b/Demos/Cube/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Cube.cpp +) + +serenity_bin(Cube) +target_link_libraries(Cube LibGUI) diff --git a/Demos/Cube/Makefile b/Demos/Cube/Makefile deleted file mode 100644 index 28ea8daab0..0000000000 --- a/Demos/Cube/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - Cube.o - -PROGRAM = Cube - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Demos/DynamicLink/CMakeLists.txt b/Demos/DynamicLink/CMakeLists.txt new file mode 100644 index 0000000000..d162567bdd --- /dev/null +++ b/Demos/DynamicLink/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(LinkDemo) +add_subdirectory(LinkLib) diff --git a/Demos/DynamicLink/LinkDemo/CMakeLists.txt b/Demos/DynamicLink/LinkDemo/CMakeLists.txt new file mode 100644 index 0000000000..ec5506f6a2 --- /dev/null +++ b/Demos/DynamicLink/LinkDemo/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(LinkDemo) +target_link_libraries(LinkDemo LibC) diff --git a/Demos/DynamicLink/LinkDemo/Makefile b/Demos/DynamicLink/LinkDemo/Makefile deleted file mode 100644 index c40469320d..0000000000 --- a/Demos/DynamicLink/LinkDemo/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = LinkDemo - -SUBPROJECT_CXXFLAGS = -fPIC - -include ../../../Makefile.common diff --git a/Demos/DynamicLink/LinkLib/CMakeLists.txt b/Demos/DynamicLink/LinkLib/CMakeLists.txt new file mode 100644 index 0000000000..982cdda6a5 --- /dev/null +++ b/Demos/DynamicLink/LinkLib/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + DynamicLib.cpp +) + +add_library(DynamicLib SHARED ${SOURCES}) +target_link_libraries(DynamicLib LibC) +install(TARGETS DynamicLib DESTINATION usr/lib) diff --git a/Demos/DynamicLink/LinkLib/Makefile b/Demos/DynamicLink/LinkLib/Makefile deleted file mode 100644 index c4550d9f61..0000000000 --- a/Demos/DynamicLink/LinkLib/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -include ../../../Makefile.common - -DYNLIBRARY = libDynamicLib.so - -EXTRA_CLEAN = *.o *.so - -all: $(DYNLIBRARY) - -DynamicLib.o: DynamicLib.cpp - @echo "$(notdir $(CURDIR)): C++ $@" - $(QUIET) $(CXX) -DDEBUG -fPIC -isystem../../../ -o $@ -c $< - -$(DYNLIBRARY): DynamicLib.o - @echo "$(notdir $(CURDIR)): DYLIB $@" - $(QUIET) $(CXX) -shared -o $(DYNLIBRARY) $< diff --git a/Demos/DynamicLink/Makefile b/Demos/DynamicLink/Makefile deleted file mode 100644 index d10b5ae814..0000000000 --- a/Demos/DynamicLink/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(wildcard */.) - -include ../../Makefile.subdir diff --git a/Demos/Fire/CMakeLists.txt b/Demos/Fire/CMakeLists.txt new file mode 100644 index 0000000000..315b7f5216 --- /dev/null +++ b/Demos/Fire/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Fire.cpp +) + +serenity_bin(Fire) +target_link_libraries(Fire LibGUI LibCore LibGfx) diff --git a/Demos/Fire/Makefile b/Demos/Fire/Makefile deleted file mode 100644 index 681ded21c9..0000000000 --- a/Demos/Fire/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - Fire.o - -PROGRAM = Fire - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Demos/HelloWorld/CMakeLists.txt b/Demos/HelloWorld/CMakeLists.txt new file mode 100644 index 0000000000..2469b40a09 --- /dev/null +++ b/Demos/HelloWorld/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(HelloWorld) +target_link_libraries(HelloWorld LibGUI) diff --git a/Demos/HelloWorld/Makefile b/Demos/HelloWorld/Makefile deleted file mode 100644 index 30d76744dc..0000000000 --- a/Demos/HelloWorld/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = HelloWorld - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Demos/Makefile b/Demos/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/Demos/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/Demos/Mouse/CMakeLists.txt b/Demos/Mouse/CMakeLists.txt new file mode 100644 index 0000000000..389e625d1e --- /dev/null +++ b/Demos/Mouse/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(Mouse) +target_link_libraries(Mouse LibGUI LibGfx) diff --git a/Demos/Mouse/Makefile b/Demos/Mouse/Makefile deleted file mode 100644 index b08538d561..0000000000 --- a/Demos/Mouse/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = Mouse - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Demos/Screensaver/CMakeLists.txt b/Demos/Screensaver/CMakeLists.txt new file mode 100644 index 0000000000..0b58e1c7af --- /dev/null +++ b/Demos/Screensaver/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Screensaver.cpp +) + +serenity_bin(Screensaver) +target_link_libraries(Screensaver LibGUI LibCore LibGfx) diff --git a/Demos/Screensaver/Makefile b/Demos/Screensaver/Makefile deleted file mode 100644 index 3c7424a224..0000000000 --- a/Demos/Screensaver/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - Screensaver.o - -PROGRAM = Screensaver - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Demos/WidgetGallery/CMakeLists.txt b/Demos/WidgetGallery/CMakeLists.txt new file mode 100644 index 0000000000..936f8a168b --- /dev/null +++ b/Demos/WidgetGallery/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(WidgetGallery) +target_link_libraries(WidgetGallery LibGUI) diff --git a/Demos/WidgetGallery/Makefile b/Demos/WidgetGallery/Makefile deleted file mode 100644 index 3e3b827187..0000000000 --- a/Demos/WidgetGallery/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = WidgetGallery - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/DevTools/CMakeLists.txt b/DevTools/CMakeLists.txt new file mode 100644 index 0000000000..65d913a60f --- /dev/null +++ b/DevTools/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(HackStudio) +add_subdirectory(Inspector) +add_subdirectory(ProfileViewer) +add_subdirectory(VisualBuilder) diff --git a/DevTools/FormCompiler/CMakeLists.txt b/DevTools/FormCompiler/CMakeLists.txt new file mode 100644 index 0000000000..ece3b62f56 --- /dev/null +++ b/DevTools/FormCompiler/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +add_executable(FormCompiler ${SOURCES}) +target_link_libraries(FormCompiler LagomCore) diff --git a/DevTools/FormCompiler/Makefile b/DevTools/FormCompiler/Makefile deleted file mode 100644 index ed927d3371..0000000000 --- a/DevTools/FormCompiler/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -USE_HOST_CXX = 1 - -PROGRAM = FormCompiler - -OBJS = \ - main.o \ - ../../AK/FlyString.o \ - ../../AK/JsonParser.o \ - ../../AK/JsonValue.o \ - ../../AK/LogStream.o \ - ../../AK/String.o \ - ../../AK/StringBuilder.o \ - ../../AK/StringImpl.o \ - ../../AK/StringUtils.o \ - ../../AK/StringView.o \ - ../../Libraries/LibCore/IODevice.o \ - ../../Libraries/LibCore/File.o \ - ../../Libraries/LibCore/Object.o \ - ../../Libraries/LibCore/Event.o \ - ../../Libraries/LibCore/Socket.o \ - ../../Libraries/LibCore/LocalSocket.o \ - ../../Libraries/LibCore/LocalServer.o \ - ../../Libraries/LibCore/Notifier.o \ - ../../Libraries/LibCore/EventLoop.o - -include ../../Makefile.common diff --git a/DevTools/HackStudio/CMakeLists.txt b/DevTools/HackStudio/CMakeLists.txt new file mode 100644 index 0000000000..34366c4b41 --- /dev/null +++ b/DevTools/HackStudio/CMakeLists.txt @@ -0,0 +1,24 @@ +set(SOURCES + CursorTool.cpp + Debugger/BacktraceModel.cpp + Debugger/Debugger.cpp + Debugger/DebugInfoWidget.cpp + Debugger/VariablesModel.cpp + Editor.cpp + EditorWrapper.cpp + FindInFilesWidget.cpp + FormEditorWidget.cpp + FormWidget.cpp + Locator.cpp + main.cpp + ProcessStateWidget.cpp + Project.cpp + ProjectFile.cpp + TerminalWrapper.cpp + Tool.cpp + WidgetTool.cpp + WidgetTreeModel.cpp +) + +serenity_bin(HackStudio) +target_link_libraries(HackStudio LibWeb LibMarkdown LibGUI LibGfx LibCore LibVT LibDebug) diff --git a/DevTools/HackStudio/Makefile b/DevTools/HackStudio/Makefile deleted file mode 100644 index 583032a8c8..0000000000 --- a/DevTools/HackStudio/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -OBJS = \ - Project.o \ - ProjectFile.o \ - TerminalWrapper.o \ - FindInFilesWidget.o \ - ProcessStateWidget.o \ - FormEditorWidget.o \ - FormWidget.o \ - Editor.o \ - EditorWrapper.o \ - Locator.o \ - Tool.o \ - CursorTool.o \ - WidgetTool.o \ - WidgetTreeModel.o \ - main.o \ - Debugger/DebugInfoWidget.o \ - Debugger/Debugger.o \ - Debugger/VariablesModel.o \ - Debugger/BacktraceModel.o - -PROGRAM = HackStudio - -LIB_DEPS = GUI Web TextCodec VT Desktop Protocol Markdown Gfx IPC Thread Pthread Core JS Debug - -include ../../Makefile.common diff --git a/DevTools/IPCCompiler/CMakeLists.txt b/DevTools/IPCCompiler/CMakeLists.txt new file mode 100644 index 0000000000..6969cef777 --- /dev/null +++ b/DevTools/IPCCompiler/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +add_executable(IPCCompiler ${SOURCES}) +target_link_libraries(IPCCompiler LagomCore) diff --git a/DevTools/IPCCompiler/Makefile b/DevTools/IPCCompiler/Makefile deleted file mode 100644 index 498f71883f..0000000000 --- a/DevTools/IPCCompiler/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -USE_HOST_CXX = 1 - -PROGRAM = IPCCompiler - -OBJS = \ - main.o \ - ../../AK/FlyString.o \ - ../../AK/JsonParser.o \ - ../../AK/JsonValue.o \ - ../../AK/LogStream.o \ - ../../AK/String.o \ - ../../AK/StringBuilder.o \ - ../../AK/StringImpl.o \ - ../../AK/StringUtils.o \ - ../../AK/StringView.o \ - ../../Libraries/LibCore/IODevice.o \ - ../../Libraries/LibCore/File.o \ - ../../Libraries/LibCore/Object.o \ - ../../Libraries/LibCore/Event.o \ - ../../Libraries/LibCore/Socket.o \ - ../../Libraries/LibCore/LocalSocket.o \ - ../../Libraries/LibCore/Notifier.o \ - ../../Libraries/LibCore/LocalServer.o \ - ../../Libraries/LibCore/EventLoop.o - -include ../../Makefile.common diff --git a/DevTools/Inspector/CMakeLists.txt b/DevTools/Inspector/CMakeLists.txt new file mode 100644 index 0000000000..cadfd75f4f --- /dev/null +++ b/DevTools/Inspector/CMakeLists.txt @@ -0,0 +1,10 @@ +set(SOURCES + main.cpp + RemoteObject.cpp + RemoteObjectGraphModel.cpp + RemoteObjectPropertyModel.cpp + RemoteProcess.cpp +) + +serenity_bin(Inspector) +target_link_libraries(Inspector LibGUI) diff --git a/DevTools/Inspector/Makefile b/DevTools/Inspector/Makefile deleted file mode 100644 index 80d6c58563..0000000000 --- a/DevTools/Inspector/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = \ - RemoteObjectGraphModel.o \ - RemoteObjectPropertyModel.o \ - RemoteProcess.o \ - RemoteObject.o \ - main.o - -PROGRAM = Inspector - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/DevTools/Makefile b/DevTools/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/DevTools/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/DevTools/ProfileViewer/CMakeLists.txt b/DevTools/ProfileViewer/CMakeLists.txt new file mode 100644 index 0000000000..c1adfa7ecf --- /dev/null +++ b/DevTools/ProfileViewer/CMakeLists.txt @@ -0,0 +1,10 @@ +set(SOURCES + DisassemblyModel.cpp + main.cpp + Profile.cpp + ProfileModel.cpp + ProfileTimelineWidget.cpp +) + +serenity_bin(ProfileViewer) +target_link_libraries(ProfileViewer LibGUI LibX86) diff --git a/DevTools/ProfileViewer/Makefile b/DevTools/ProfileViewer/Makefile deleted file mode 100644 index 4df2dc0236..0000000000 --- a/DevTools/ProfileViewer/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = \ - DisassemblyModel.o \ - Profile.o \ - ProfileModel.o \ - ProfileTimelineWidget.o \ - main.o - -PROGRAM = ProfileViewer - -LIB_DEPS = GUI Gfx IPC Core X86 - -include ../../Makefile.common diff --git a/DevTools/VisualBuilder/CMakeLists.txt b/DevTools/VisualBuilder/CMakeLists.txt new file mode 100644 index 0000000000..78bedff4f1 --- /dev/null +++ b/DevTools/VisualBuilder/CMakeLists.txt @@ -0,0 +1,12 @@ +set(SOURCES + main.cpp + VBForm.cpp + VBPropertiesWindow.cpp + VBProperty.cpp + VBWidget.cpp + VBWidgetPropertyModel.cpp + VBWidgetRegistry.cpp +) + +serenity_bin(VisualBuilder) +target_link_libraries(VisualBuilder LibGUI) diff --git a/DevTools/VisualBuilder/Makefile b/DevTools/VisualBuilder/Makefile deleted file mode 100644 index 85350423b0..0000000000 --- a/DevTools/VisualBuilder/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -OBJS = \ - VBForm.o \ - VBWidget.o \ - VBWidgetRegistry.o \ - VBWidgetPropertyModel.o \ - VBProperty.o \ - VBPropertiesWindow.o \ - main.o - -PROGRAM = VisualBuilder - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/Documentation/BuildInstructions.md b/Documentation/BuildInstructions.md index 5fbd287624..a4be3b7d3e 100644 --- a/Documentation/BuildInstructions.md +++ b/Documentation/BuildInstructions.md @@ -5,7 +5,7 @@ Make sure you have all the dependencies installed: **Debian / Ubuntu** ```bash -sudo apt install build-essential curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs qemu-system-i386 qemu-utils +sudo apt install build-essential cmake curl libmpfr-dev libmpc-dev libgmp-dev e2fsprogs qemu-system-i386 qemu-utils ``` On Docker, install these as well: @@ -15,12 +15,12 @@ sudo apt install wget genext2fs **Fedora** ```bash -sudo dnf install curl mpfr-devel libmpc-devel gmp-devel e2fsprogs @"C Development Tools and Libraries" @Virtualization +sudo dnf install curl cmake mpfr-devel libmpc-devel gmp-devel e2fsprogs @"C Development Tools and Libraries" @Virtualization ``` **Arch Linux / Manjaro** ```bash -sudo pacman -S base-devel curl mpfr libmpc gmp e2fsprogs qemu qemu-arch-extra +sudo pacman -S base-devel cmake curl mpfr libmpc gmp e2fsprogs qemu qemu-arch-extra ``` Ensure your gcc version is >= 8 with `gcc --version`. Otherwise, install it (on Ubuntu) with: @@ -61,16 +61,22 @@ Notes: pkg_add bash gmp gcc git flock gmake sudo ``` -When building with `make`, `gmake` must be used. The `makeall.sh` script will do this automatically when building on OpenBSD. - ### Build > Before starting, make sure that you have configured your global identity for git, or the first script will fail after running for a bit. Go into the `Toolchain/` directory and run the **BuildIt.sh** script. -Once you've built the toolchain, go into the `Kernel/` directory, then run -**./makeall.sh**, and if nothing breaks too much, take it for a spin by using -**./run**. +Once you've built the toolchain, create a directory for the build to live in (for example, `Build/`), and run the CMake build: +``` +$ mkdir Build && cd Build +$ cmake .. +$ make +$ make install +``` + +This will compile all of SerenityOS and install the built files into `Root/` inside the build tree. `make install` actually pulls in the regular `make` (`make all`) automatically, so there isn't really a need to run it exlicitly. You may also want ask `make` to build things in parallel by using `-j`, optionally specifying the maximum number of jobs to run. + +Now to build a disk image, run `make image`, and if nothing breaks too much, take it for a spin by using `make run`. Note that the `anon` user is able to become `root` without password by default, as a development convenience. To prevent this, remove `anon` from the `wheel` group and he will no longer be able to run `/bin/su`. @@ -79,9 +85,9 @@ On Linux, QEMU is significantly faster if it's able to use KVM. The run script w Bare curious users may even consider sourcing suitable hardware to [install Serenity on a physical PC.](https://github.com/SerenityOS/serenity/blob/master/INSTALL.md) -Later on, when you `git pull` to get the latest changes, there's no need to rebuild the toolchain. You can simply rerun **./makeall.sh** in the `Kernel/` directory and you'll be good to **./run** again. +Later on, when you `git pull` to get the latest changes, there's no need to rebuild the toolchain. You can simply run `make install`, `make image`, `make run` again. CMake will only rebuild those parts that have been updated. -You can even re-compile only parts of the system. Imagine you changed something in the **WindowServer**. Then run `make -C ../Services/WindowServer` (from the `Kernel/` directory) followed by **./sync.sh** to update the disk image. Then you can start the system with **./run** again. +You may also want to replace `make` with `ninja` in the above (use `cmake .. -G Ninja` when configuring the build) for some additional build speed benefits. #### Ports To add a package from the ports collection to Serenity, for example curl, go into `Ports/curl/` and run **./package.sh**. The sourcecode for the package will be downloaded and the package will be built. After that, run **./sync.sh** from the `Kernel/` directory to update the disk image. The next time you start Serenity with **./run**, `curl` will be available. diff --git a/Games/CMakeLists.txt b/Games/CMakeLists.txt new file mode 100644 index 0000000000..ea6349a6da --- /dev/null +++ b/Games/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(Minesweeper) +add_subdirectory(Snake) +add_subdirectory(Solitaire) diff --git a/Games/Makefile b/Games/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/Games/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/Games/Minesweeper/CMakeLists.txt b/Games/Minesweeper/CMakeLists.txt new file mode 100644 index 0000000000..e50f100ad2 --- /dev/null +++ b/Games/Minesweeper/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + Field.cpp + main.cpp +) + +serenity_bin(Minesweeper) +target_link_libraries(Minesweeper LibGUI) diff --git a/Games/Minesweeper/Makefile b/Games/Minesweeper/Makefile deleted file mode 100644 index ec87fb5e82..0000000000 --- a/Games/Minesweeper/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - Field.o \ - main.o - -PROGRAM = Minesweeper - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Games/Snake/CMakeLists.txt b/Games/Snake/CMakeLists.txt new file mode 100644 index 0000000000..c40e284ad4 --- /dev/null +++ b/Games/Snake/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + SnakeGame.cpp +) + +serenity_bin(Snake) +target_link_libraries(Snake LibGUI) diff --git a/Games/Snake/Makefile b/Games/Snake/Makefile deleted file mode 100644 index 353b28f433..0000000000 --- a/Games/Snake/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - SnakeGame.o \ - main.o - -PROGRAM = Snake - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Games/Solitaire/CMakeLists.txt b/Games/Solitaire/CMakeLists.txt new file mode 100644 index 0000000000..e61f9e3bfb --- /dev/null +++ b/Games/Solitaire/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + Card.cpp + CardStack.cpp + main.cpp + SolitaireWidget.cpp +) + +serenity_bin(Solitaire) +target_link_libraries(Solitaire LibGUI LibGfx LibCore) diff --git a/Games/Solitaire/Makefile b/Games/Solitaire/Makefile deleted file mode 100644 index 209d3f64cf..0000000000 --- a/Games/Solitaire/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - SolitaireWidget.o\ - CardStack.o\ - Card.o\ - main.o - -PROGRAM = Solitaire - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt new file mode 100644 index 0000000000..e27143218d --- /dev/null +++ b/Kernel/CMakeLists.txt @@ -0,0 +1,181 @@ +set(KERNEL_SOURCES + ACPI/DMIDecoder.cpp + ACPI/DynamicParser.cpp + ACPI/Initialize.cpp + ACPI/MultiProcessorParser.cpp + ACPI/Parser.cpp + Arch/i386/CPU.cpp + CMOS.cpp + CommandLine.cpp + Devices/BlockDevice.cpp + Devices/BXVGADevice.cpp + Devices/CharacterDevice.cpp + Devices/Device.cpp + Devices/DiskPartition.cpp + Devices/EBRPartitionTable.cpp + Devices/FullDevice.cpp + Devices/GPTPartitionTable.cpp + Devices/KeyboardDevice.cpp + Devices/MBRPartitionTable.cpp + Devices/MBVGADevice.cpp + Devices/NullDevice.cpp + Devices/PATAChannel.cpp + Devices/PATADiskDevice.cpp + Devices/PCSpeaker.cpp + Devices/PS2MouseDevice.cpp + Devices/RandomDevice.cpp + Devices/SB16.cpp + Devices/SerialDevice.cpp + Devices/VMWareBackdoor.cpp + Devices/ZeroDevice.cpp + DoubleBuffer.cpp + FileSystem/Custody.cpp + FileSystem/DevPtsFS.cpp + FileSystem/Ext2FileSystem.cpp + FileSystem/FIFO.cpp + FileSystem/FileBackedFileSystem.cpp + FileSystem/File.cpp + FileSystem/FileDescription.cpp + FileSystem/FileSystem.cpp + FileSystem/Inode.cpp + FileSystem/InodeFile.cpp + FileSystem/InodeWatcher.cpp + FileSystem/ProcFS.cpp + FileSystem/TmpFS.cpp + FileSystem/VirtualFileSystem.cpp + Heap/kmalloc.cpp + Heap/SlabAllocator.cpp + init.cpp + Interrupts/APIC.cpp + Interrupts/GenericInterruptHandler.cpp + Interrupts/InterruptManagement.cpp + Interrupts/IOAPIC.cpp + Interrupts/IRQHandler.cpp + Interrupts/PIC.cpp + Interrupts/SharedIRQHandler.cpp + Interrupts/SpuriousInterruptHandler.cpp + Interrupts/UnhandledInterruptHandler.cpp + KBufferBuilder.cpp + KSyms.cpp + Lock.cpp + Net/E1000NetworkAdapter.cpp + Net/IPv4Socket.cpp + Net/LocalSocket.cpp + Net/LoopbackAdapter.cpp + Net/NetworkAdapter.cpp + Net/NetworkTask.cpp + Net/Routing.cpp + Net/RTL8139NetworkAdapter.cpp + Net/Socket.cpp + Net/TCPSocket.cpp + Net/UDPSocket.cpp + PCI/Access.cpp + PCI/Device.cpp + PCI/Initializer.cpp + PCI/IOAccess.cpp + PCI/MMIOAccess.cpp + PerformanceEventBuffer.cpp + Process.cpp + Profiling.cpp + Ptrace.cpp + Random.cpp + RTC.cpp + Scheduler.cpp + SharedBuffer.cpp + Syscall.cpp + Tasks/FinalizerTask.cpp + Tasks/SyncTask.cpp + Thread.cpp + ThreadTracer.cpp + Time/HardwareTimer.cpp + Time/HPETComparator.cpp + Time/HPET.cpp + Time/PIT.cpp + TimerQueue.cpp + Time/RTC.cpp + Time/TimeManagement.cpp + TTY/MasterPTY.cpp + TTY/PTYMultiplexer.cpp + TTY/SlavePTY.cpp + TTY/TTY.cpp + TTY/VirtualConsole.cpp + VM/AnonymousVMObject.cpp + VM/ContiguousVMObject.cpp + VM/InodeVMObject.cpp + VM/MemoryManager.cpp + VM/PageDirectory.cpp + VM/PhysicalPage.cpp + VM/PhysicalRegion.cpp + VM/PrivateInodeVMObject.cpp + VM/ProcessPagingScope.cpp + VM/PurgeableVMObject.cpp + VM/RangeAllocator.cpp + VM/Region.cpp + VM/SharedInodeVMObject.cpp + VM/VMObject.cpp + WaitQueue.cpp +) + +set(AK_SOURCES + ../AK/FileSystemPath.cpp + ../AK/FlyString.cpp + ../AK/JsonParser.cpp + ../AK/JsonValue.cpp + ../AK/LogStream.cpp + ../AK/String.cpp + ../AK/StringBuilder.cpp + ../AK/StringImpl.cpp + ../AK/StringUtils.cpp + ../AK/StringView.cpp +) + +set(ELF_SOURCES + ../Libraries/LibELF/Image.cpp + ../Libraries/LibELF/Loader.cpp + ../Libraries/LibELF/Validation.cpp +) + +set(BARE_METAL_SOURCES + ../Libraries/LibBareMetal/Output/Console.cpp + ../Libraries/LibBareMetal/Output/kprintf.cpp + ../Libraries/LibBareMetal/StdLib.cpp +) + +set(SOURCES + ${KERNEL_SOURCES} + ${AK_SOURCES} + ${ELF_SOURCES} + ${BARE_METAL_SOURCES} +) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DKERNEL") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pie -fPIE -ffreestanding -fbuiltin") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-80387 -mno-mmx -mno-sse -mno-sse2") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-asynchronous-unwind-tables") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdlib -nostdinc -nostdinc++") + +add_link_options(LINKER:-T ${CMAKE_CURRENT_BINARY_DIR}/linker.ld -nostdlib) + +add_library(boot OBJECT Arch/i386/Boot/boot.S) +file(GENERATE OUTPUT linker.ld INPUT linker.ld) + +if (${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS) + include_directories(/usr/local/include/c++/9.3.0/) + include_directories(/usr/local/include/c++/9.3.0/i686-pc-serenity/) +else() + include_directories(../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/) + include_directories(../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/i686-pc-serenity/) +endif() + +add_executable(Kernel ${SOURCES}) +target_link_libraries(Kernel gcc stdc++) +add_dependencies(Kernel boot) +install(TARGETS Kernel RUNTIME DESTINATION boot) + +add_custom_command( + TARGET Kernel + COMMAND sh ${CMAKE_CURRENT_SOURCE_DIR}/mkmap.sh +) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kernel.map DESTINATION res) + +add_subdirectory(Modules) diff --git a/Kernel/Devices/KeyboardDevice.h b/Kernel/Devices/KeyboardDevice.h index 51638ba1bc..f1c2a6a598 100644 --- a/Kernel/Devices/KeyboardDevice.h +++ b/Kernel/Devices/KeyboardDevice.h @@ -26,12 +26,12 @@ #pragma once -#include "KeyCode.h" #include <AK/CircularQueue.h> #include <AK/DoublyLinkedList.h> #include <AK/Types.h> #include <Kernel/Devices/CharacterDevice.h> #include <Kernel/Interrupts/IRQHandler.h> +#include <Kernel/KeyCode.h> namespace Kernel { diff --git a/Kernel/FileSystem/ProcFS.cpp b/Kernel/FileSystem/ProcFS.cpp index 927383dd45..1e7e15d4d8 100644 --- a/Kernel/FileSystem/ProcFS.cpp +++ b/Kernel/FileSystem/ProcFS.cpp @@ -24,10 +24,6 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "ProcFS.h" -#include "KSyms.h" -#include "Process.h" -#include "Scheduler.h" #include <AK/JsonArraySerializer.h> #include <AK/JsonObject.h> #include <AK/JsonObjectSerializer.h> @@ -38,11 +34,13 @@ #include <Kernel/FileSystem/Custody.h> #include <Kernel/FileSystem/FileBackedFileSystem.h> #include <Kernel/FileSystem/FileDescription.h> +#include <Kernel/FileSystem/ProcFS.h> #include <Kernel/FileSystem/VirtualFileSystem.h> #include <Kernel/Heap/kmalloc.h> #include <Kernel/Interrupts/GenericInterruptHandler.h> #include <Kernel/Interrupts/InterruptManagement.h> #include <Kernel/KBufferBuilder.h> +#include <Kernel/KSyms.h> #include <Kernel/Module.h> #include <Kernel/Net/LocalSocket.h> #include <Kernel/Net/NetworkAdapter.h> @@ -50,7 +48,9 @@ #include <Kernel/Net/TCPSocket.h> #include <Kernel/Net/UDPSocket.h> #include <Kernel/PCI/Access.h> +#include <Kernel/Process.h> #include <Kernel/Profiling.h> +#include <Kernel/Scheduler.h> #include <Kernel/TTY/TTY.h> #include <Kernel/VM/MemoryManager.h> #include <Kernel/VM/PurgeableVMObject.h> diff --git a/Kernel/KBufferBuilder.cpp b/Kernel/KBufferBuilder.cpp index bfd8c8d995..adc0da3516 100644 --- a/Kernel/KBufferBuilder.cpp +++ b/Kernel/KBufferBuilder.cpp @@ -26,7 +26,7 @@ #include <AK/PrintfImplementation.h> #include <AK/StdLibExtras.h> -#include <KBufferBuilder.h> +#include <Kernel/KBufferBuilder.h> #include <stdarg.h> namespace Kernel { diff --git a/Kernel/Makefile b/Kernel/Makefile deleted file mode 100644 index b15ccef7cf..0000000000 --- a/Kernel/Makefile +++ /dev/null @@ -1,171 +0,0 @@ -OBJS = \ - ../AK/FileSystemPath.o \ - ../AK/FlyString.o \ - ../AK/JsonParser.o \ - ../AK/JsonValue.o \ - ../AK/LogStream.o \ - ../AK/String.o \ - ../AK/StringBuilder.o \ - ../AK/StringImpl.o \ - ../AK/StringUtils.o \ - ../AK/StringView.o \ - ../Libraries/LibELF/Image.o \ - ../Libraries/LibELF/Loader.o \ - ../Libraries/LibELF/Validation.o \ - ../Libraries/LibBareMetal/Output/Console.o \ - ../Libraries/LibBareMetal/Output/kprintf.o \ - ../Libraries/LibBareMetal/StdLib.o \ - Arch/i386/CPU.o \ - CommandLine.o \ - Interrupts/InterruptManagement.o \ - Interrupts/APIC.o \ - Interrupts/IOAPIC.o \ - Interrupts/PIC.o \ - Interrupts/GenericInterruptHandler.o \ - Interrupts/UnhandledInterruptHandler.o \ - Interrupts/SpuriousInterruptHandler.o \ - Interrupts/IRQHandler.o \ - Interrupts/SharedIRQHandler.o \ - CMOS.o \ - Time/PIT.o \ - Time/TimeManagement.o \ - Time/HardwareTimer.o \ - Time/RTC.o \ - Time/HPET.o \ - Time/HPETComparator.o \ - Devices/BXVGADevice.o \ - Devices/BlockDevice.o \ - Devices/CharacterDevice.o \ - Devices/Device.o \ - Devices/DiskPartition.o \ - Devices/FullDevice.o \ - Devices/GPTPartitionTable.o \ - Devices/EBRPartitionTable.o \ - Devices/KeyboardDevice.o \ - Devices/MBRPartitionTable.o \ - Devices/MBVGADevice.o \ - Devices/NullDevice.o \ - Devices/PATAChannel.o \ - Devices/PATADiskDevice.o \ - Devices/PCSpeaker.o \ - Devices/PS2MouseDevice.o \ - Devices/RandomDevice.o \ - Devices/SB16.o \ - Devices/SerialDevice.o \ - Devices/ZeroDevice.o \ - Devices/VMWareBackdoor.o \ - DoubleBuffer.o \ - FileSystem/Custody.o \ - FileSystem/DevPtsFS.o \ - FileSystem/Ext2FileSystem.o \ - FileSystem/FileBackedFileSystem.o \ - FileSystem/FIFO.o \ - FileSystem/File.o \ - FileSystem/FileDescription.o \ - FileSystem/FileSystem.o \ - FileSystem/Inode.o \ - FileSystem/InodeFile.o \ - FileSystem/InodeWatcher.o \ - FileSystem/ProcFS.o \ - FileSystem/TmpFS.o \ - FileSystem/VirtualFileSystem.o \ - Heap/SlabAllocator.o \ - Heap/kmalloc.o \ - KBufferBuilder.o \ - KSyms.o \ - Lock.o \ - Net/E1000NetworkAdapter.o \ - Net/IPv4Socket.o \ - Net/LocalSocket.o \ - Net/LoopbackAdapter.o \ - Net/NetworkAdapter.o \ - Net/NetworkTask.o \ - Net/RTL8139NetworkAdapter.o \ - Net/Routing.o \ - Net/Socket.o \ - Net/TCPSocket.o \ - Net/UDPSocket.o \ - PCI/Access.o \ - PCI/IOAccess.o \ - PCI/MMIOAccess.o \ - PCI/Initializer.o \ - PCI/Device.o \ - PerformanceEventBuffer.o \ - Process.o \ - ThreadTracer.o \ - Profiling.o \ - RTC.o \ - Random.o \ - Scheduler.o \ - SharedBuffer.o \ - Syscall.o \ - Tasks/FinalizerTask.o \ - Tasks/SyncTask.o \ - TimerQueue.o \ - TTY/MasterPTY.o \ - TTY/PTYMultiplexer.o \ - TTY/SlavePTY.o \ - TTY/TTY.o \ - TTY/VirtualConsole.o \ - Thread.o \ - VM/AnonymousVMObject.o \ - VM/ContiguousVMObject.o \ - VM/InodeVMObject.o \ - VM/MemoryManager.o \ - VM/PageDirectory.o \ - VM/PhysicalPage.o \ - VM/PhysicalRegion.o \ - VM/PurgeableVMObject.o \ - VM/PrivateInodeVMObject.o \ - VM/ProcessPagingScope.o \ - VM/RangeAllocator.o \ - VM/Region.o \ - VM/SharedInodeVMObject.o \ - VM/VMObject.o \ - ACPI/DMIDecoder.o \ - ACPI/DynamicParser.o \ - ACPI/Initialize.o \ - ACPI/MultiProcessorParser.o \ - ACPI/Parser.o \ - WaitQueue.o \ - init.o \ - Ptrace.o - -OBJ_SUFFIX = .kernel - -MODULE_OBJS = TestModule$(OBJ_SUFFIX).o - -EXTRA_OBJS = Arch/i386/Boot/boot.ao - -KERNEL = 1 - -PROGRAM = kernel - -SUBPROJECT_CXXFLAGS += -pie -fPIE -ffreestanding -fbuiltin -mno-80387 -mno-mmx -mno-sse -mno-sse2 -fno-asynchronous-unwind-tables -SUBPROJECT_CXXFLAGS += -nostdlib -nostdinc -nostdinc++ $(SERENITY_KERNEL_CUSTOM_CXXFLAGS) - -UNAME_S := $(shell uname -s) - -ifeq ($(UNAME_S),SerenityOS) - SUBPROJECT_CXXFLAGS += -I/usr/local/include/c++/9.3.0/ - SUBPROJECT_CXXFLAGS += -I/usr/local/include/c++/9.3.0/i686-pc-serenity/ -else - SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/ - SUBPROJECT_CXXFLAGS += -I../Toolchain/Local/i686-pc-serenity/include/c++/9.3.0/i686-pc-serenity/ -endif - -LDFLAGS += -Wl,-T linker.ld -nostdlib -lgcc -lstdc++ $(SERENITY_KERNEL_CUSTOM_LDFLAGS) - -all: $(PROGRAM) $(MODULE_OBJS) kernel.map - -kernel.map: kernel - @echo "MKMAP $@" - $(QUIET) sh mkmap.sh - -EXTRA_CLEAN += kernel.map - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/Kernel/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/Kernel/ - -include ../Makefile.common diff --git a/Kernel/Modules/CMakeLists.txt b/Kernel/Modules/CMakeLists.txt new file mode 100644 index 0000000000..c932b3123b --- /dev/null +++ b/Kernel/Modules/CMakeLists.txt @@ -0,0 +1,8 @@ +set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1) + +function(serenity_kernel_module name sources) + add_library(${name} STATIC ${sources}) + install(FILES $<TARGET_OBJECTS:${name}> DESTINATION mod) +endfunction() + +serenity_kernel_module(TestModule TestModule.cpp) diff --git a/Kernel/TestModule.cpp b/Kernel/Modules/TestModule.cpp index 3be421c934..3be421c934 100644 --- a/Kernel/TestModule.cpp +++ b/Kernel/Modules/TestModule.cpp diff --git a/Kernel/TTY/TTY.cpp b/Kernel/TTY/TTY.cpp index f2215a7782..6e3768aca5 100644 --- a/Kernel/TTY/TTY.cpp +++ b/Kernel/TTY/TTY.cpp @@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "Process.h" +#include <Kernel/Process.h> #include <Kernel/TTY/TTY.h> #include <LibC/errno_numbers.h> #include <LibC/signal_numbers.h> diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/VM/MemoryManager.cpp index 1f46b619f5..2816dd9888 100644 --- a/Kernel/VM/MemoryManager.cpp +++ b/Kernel/VM/MemoryManager.cpp @@ -24,14 +24,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "CMOS.h" -#include "Process.h" #include <AK/Assertions.h> #include <AK/Memory.h> #include <AK/StringView.h> #include <Kernel/Arch/i386/CPU.h> +#include <Kernel/CMOS.h> #include <Kernel/FileSystem/Inode.h> #include <Kernel/Multiboot.h> +#include <Kernel/Process.h> #include <Kernel/VM/AnonymousVMObject.h> #include <Kernel/VM/ContiguousVMObject.h> #include <Kernel/VM/MemoryManager.h> diff --git a/Kernel/build-root-filesystem.sh b/Kernel/build-root-filesystem.sh deleted file mode 100755 index 339008290c..0000000000 --- a/Kernel/build-root-filesystem.sh +++ /dev/null @@ -1,228 +0,0 @@ -#!/bin/sh - -set -e - -wheel_gid=1 -tty_gid=2 -phys_gid=3 -audio_gid=4 -window_uid=13 -window_gid=13 - -die() { - echo "die: $*" - exit 1 -} - -if [ "$(id -u)" != 0 ]; then - die "this script needs to run as root" -fi - -umask 0022 - -printf "creating initial filesystem structure... " -for dir in bin etc proc mnt tmp; do - mkdir -p mnt/$dir -done -chmod 1777 mnt/tmp -echo "done" - -printf "setting up device nodes... " -mkdir -p mnt/dev -mkdir -p mnt/dev/pts -mknod mnt/dev/fb0 b 29 0 -chmod 660 mnt/dev/fb0 -chown 0:$phys_gid mnt/dev/fb0 -mknod mnt/dev/tty0 c 4 0 -mknod mnt/dev/tty1 c 4 1 -mknod mnt/dev/tty2 c 4 2 -mknod mnt/dev/tty3 c 4 3 -mknod mnt/dev/ttyS0 c 4 64 -mknod mnt/dev/ttyS1 c 4 65 -mknod mnt/dev/ttyS2 c 4 66 -mknod mnt/dev/ttyS3 c 4 67 -for tty in 0 1 2 3 S0 S1 S2 S3; do - chmod 620 mnt/dev/tty$tty - chown 0:$tty_gid mnt/dev/tty$tty -done -mknod mnt/dev/random c 1 8 -mknod mnt/dev/null c 1 3 -mknod mnt/dev/zero c 1 5 -mknod mnt/dev/full c 1 7 -# random, is failing (randomly) on fuse-ext2 on macos :) -chmod 666 mnt/dev/random || true -chmod 666 mnt/dev/null -chmod 666 mnt/dev/zero -chmod 666 mnt/dev/full -mknod mnt/dev/keyboard c 85 1 -chmod 440 mnt/dev/keyboard -chown 0:$phys_gid mnt/dev/keyboard -mknod mnt/dev/mouse c 10 1 -chmod 440 mnt/dev/mouse -chown 0:$phys_gid mnt/dev/mouse -mknod mnt/dev/audio c 42 42 -chmod 220 mnt/dev/audio -chown 0:$audio_gid mnt/dev/audio -mknod mnt/dev/ptmx c 5 2 -chmod 666 mnt/dev/ptmx -mknod mnt/dev/hda b 3 0 -mknod mnt/dev/hdb b 3 1 -mknod mnt/dev/hdc b 4 0 -mknod mnt/dev/hdd b 4 1 -for hd in a b c d; do - chmod 600 mnt/dev/hd$hd -done - -ln -s /proc/self/fd/0 mnt/dev/stdin -ln -s /proc/self/fd/1 mnt/dev/stdout -ln -s /proc/self/fd/2 mnt/dev/stderr -echo "done" - -printf "installing base system... " -cp -R ../Base/* mnt/ -cp -R ../Root/* mnt/ -cp kernel.map mnt/res/ -chmod 400 mnt/res/kernel.map - -chmod 660 mnt/etc/WindowServer/WindowServer.ini -chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini -echo "/bin/sh" > mnt/etc/shells - -echo "done" - -printf "installing users... " -mkdir -p mnt/root -mkdir -p mnt/home/anon -mkdir -p mnt/home/anon/Desktop -mkdir -p mnt/home/anon/Downloads -mkdir -p mnt/home/nona -cp ../ReadMe.md mnt/home/anon/ -cp -r ../Libraries/LibJS/Tests mnt/home/anon/js-tests -chmod 700 mnt/root -chmod 700 mnt/home/anon -chmod 700 mnt/home/nona -chown -R 0:0 mnt/root -chown -R 100:100 mnt/home/anon -chown -R 200:200 mnt/home/nona -echo "done" - -printf "installing userland... " - -if [ "$(uname -s)" = "Darwin" ]; then - find ../Userland/ -type f -perm +111 -exec cp {} mnt/bin/ \; -elif [ "$(uname -s)" = "OpenBSD" ] || [ "$(uname -s)" = "FreeBSD" ]; then - find ../Userland/ -type f -perm -555 -exec cp {} mnt/bin/ \; -else - find ../Userland/ -type f -executable -exec cp {} mnt/bin/ \; -fi -chown 0:$wheel_gid mnt/bin/su -chown 0:$phys_gid mnt/bin/shutdown -chown 0:$phys_gid mnt/bin/reboot -chmod 4750 mnt/bin/su -chmod 4755 mnt/bin/ping -chmod 4750 mnt/bin/reboot -chmod 4750 mnt/bin/shutdown -echo "done" - -printf "installing applications... " -cp ../Applications/About/About mnt/bin/About -cp ../Applications/FileManager/FileManager mnt/bin/FileManager -cp ../Applications/FontEditor/FontEditor mnt/bin/FontEditor -cp ../Applications/IRCClient/IRCClient mnt/bin/IRCClient -cp ../Applications/SystemMonitor/SystemMonitor mnt/bin/SystemMonitor -cp ../Applications/Terminal/Terminal mnt/bin/Terminal -cp ../Applications/TextEditor/TextEditor mnt/bin/TextEditor -cp ../Applications/HexEditor/HexEditor mnt/bin/HexEditor -cp ../Applications/PaintBrush/PaintBrush mnt/bin/PaintBrush -cp ../Applications/QuickShow/QuickShow mnt/bin/QuickShow -cp ../Applications/Piano/Piano mnt/bin/Piano -cp ../Applications/Calculator/Calculator mnt/bin/Calculator -cp ../Applications/Calendar/Calendar mnt/bin/Calendar -cp ../Applications/SoundPlayer/SoundPlayer mnt/bin/SoundPlayer -cp ../Applications/DisplaySettings/DisplaySettings mnt/bin/DisplaySettings -cp ../Applications/Welcome/Welcome mnt/bin/Welcome -cp ../Applications/Help/Help mnt/bin/Help -cp ../Applications/Browser/Browser mnt/bin/Browser -cp ../Applications/Debugger/Debugger mnt/bin/sdb -cp ../Games/Solitaire/Solitaire mnt/bin/Solitaire -cp ../Demos/HelloWorld/HelloWorld mnt/bin/HelloWorld -cp ../Demos/WidgetGallery/WidgetGallery mnt/bin/WidgetGallery -cp ../Demos/Cube/Cube mnt/bin/Cube -cp ../Demos/Screensaver/Screensaver mnt/bin/Screensaver -cp ../Demos/Fire/Fire mnt/bin/Fire -cp ../Demos/LibGfxDemo/LibGfxDemo mnt/bin/LibGfxDemo -cp ../Demos/Mouse/Mouse mnt/bin/Mouse -cp ../Demos/DynamicLink/LinkDemo/LinkDemo mnt/bin/LinkDemo -cp ../DevTools/HackStudio/HackStudio mnt/bin/HackStudio -cp ../DevTools/VisualBuilder/VisualBuilder mnt/bin/VisualBuilder -cp ../DevTools/Inspector/Inspector mnt/bin/Inspector -cp ../DevTools/ProfileViewer/ProfileViewer mnt/bin/ProfileViewer -cp ../Games/Minesweeper/Minesweeper mnt/bin/Minesweeper -cp ../Games/Snake/Snake mnt/bin/Snake -cp ../Services/DHCPClient/DHCPClient mnt/bin/DHCPClient -cp ../Services/LookupServer/LookupServer mnt/bin/LookupServer -cp ../Services/SystemServer/SystemServer mnt/bin/SystemServer -cp ../Services/WindowServer/WindowServer mnt/bin/WindowServer -cp ../Services/AudioServer/AudioServer mnt/bin/AudioServer -cp ../Services/TTYServer/TTYServer mnt/bin/TTYServer -cp ../Services/Taskbar/Taskbar mnt/bin/Taskbar -cp ../Services/TelnetServer/TelnetServer mnt/bin/TelnetServer -cp ../Services/ProtocolServer/ProtocolServer mnt/bin/ProtocolServer -cp ../Services/SystemMenu/SystemMenu mnt/bin/SystemMenu -cp ../Services/NotificationServer/NotificationServer mnt/bin/NotificationServer -cp ../Services/WebServer/WebServer mnt/bin/WebServer -cp ../Services/LaunchServer/LaunchServer mnt/bin/LaunchServer -cp ../Shell/Shell mnt/bin/Shell -cp ../MenuApplets/Audio/Audio.MenuApplet mnt/bin/ -cp ../MenuApplets/ResourceGraph/ResourceGraph.MenuApplet mnt/bin/ -cp ../MenuApplets/Clock/Clock.MenuApplet mnt/bin/ -cp ../MenuApplets/UserName/UserName.MenuApplet mnt/bin -echo "done" - -printf "installing dynamic libraries... " -cp ../Demos/DynamicLink/LinkLib/libDynamicLib.so mnt/usr/lib -echo "done" - -printf "installing shortcuts... " -ln -s FileManager mnt/bin/fm -ln -s HelloWorld mnt/bin/hw -ln -s IRCClient mnt/bin/irc -ln -s Minesweeper mnt/bin/ms -ln -s Shell mnt/bin/sh -ln -s Snake mnt/bin/sn -ln -s Taskbar mnt/bin/tb -ln -s VisualBuilder mnt/bin/vb -ln -s WidgetGallery mnt/bin/wg -ln -s TextEditor mnt/bin/te -ln -s HexEditor mnt/bin/he -ln -s PaintBrush mnt/bin/pb -ln -s QuickShow mnt/bin/qs -ln -s Piano mnt/bin/pi -ln -s SystemDialog mnt/bin/sd -ln -s Calculator mnt/bin/calc -ln -s Calendar mnt/bin/calendar -ln -s Inspector mnt/bin/ins -ln -s SoundPlayer mnt/bin/sp -ln -s Help mnt/bin/help -ln -s Browser mnt/bin/br -ln -s HackStudio mnt/bin/hs -ln -s SystemMonitor mnt/bin/sm -ln -s ProfileViewer mnt/bin/pv -ln -s WebServer mnt/bin/ws -ln -s Solitaire mnt/bin/sl -echo "done" - -mkdir -p mnt/boot/ -chmod 700 mnt/boot/ -cp kernel mnt/boot/ -chmod 600 mnt/boot/kernel - -mkdir -p mnt/mod/ -chmod 700 mnt/mod/ -cp TestModule.kernel.o mnt/mod/TestModule.o -chmod 600 mnt/mod/*.o - -# Run local sync script, if it exists -if [ -f sync-local.sh ]; then - sh sync-local.sh -fi diff --git a/Kernel/linker.ld b/Kernel/linker.ld index f00d9c2487..ce3e125db4 100644 --- a/Kernel/linker.ld +++ b/Kernel/linker.ld @@ -8,7 +8,7 @@ SECTIONS .text ALIGN(4K) : AT (ADDR(.text) - 0xc0000000) { - Arch/i386/Boot/boot.ao + $<TARGET_OBJECTS:boot> *(.multiboot) start_of_kernel_text = .; *(.text) diff --git a/Kernel/makeall.sh b/Kernel/makeall.sh deleted file mode 100755 index 5c3a008d85..0000000000 --- a/Kernel/makeall.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -set -e - -script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -cd "$script_path" - -fast_mode= -while [ "$1" != "" ]; do - case $1 in - -f | --fast ) fast_mode=1 - ;; - -h | --help ) printf -- "-f or --fast: build fast without cleaning or running tests\n" - exit 0 - ;; - esac - shift -done - -sudo id - -MAKE="make" - -if [ "$(uname -s)" = "OpenBSD" ] || [ "$(uname -s)" = "FreeBSD" ]; then - MAKE="gmake" -fi - -if [ "$fast_mode" = "1" ]; then - $MAKE -C ../ && \ - $MAKE -C ../ install && - sudo -E PATH="$PATH" ./build-image-qemu.sh -else - $MAKE -C ../ clean && \ - $MAKE -C ../ && \ - $MAKE -C ../ test && \ - $MAKE -C ../ install && - sudo -E PATH="$PATH" ./build-image-qemu.sh -fi diff --git a/Kernel/mkmap.sh b/Kernel/mkmap.sh index 118c0b4a5f..15231e8fcd 100644 --- a/Kernel/mkmap.sh +++ b/Kernel/mkmap.sh @@ -1,6 +1,6 @@ #!/bin/sh tmp=$(mktemp) -nm -n kernel | awk '{ if ($2 != "a") print; }' | uniq > "$tmp" +nm -n Kernel | awk '{ if ($2 != "a") print; }' | uniq > "$tmp" printf "%08x\n" "$(wc -l "$tmp" | cut -f1 -d' ')" > kernel.map cat "$tmp" >> kernel.map rm -f "$tmp" diff --git a/Libraries/CMakeLists.txt b/Libraries/CMakeLists.txt new file mode 100644 index 0000000000..8f297d21ab --- /dev/null +++ b/Libraries/CMakeLists.txt @@ -0,0 +1,23 @@ +add_subdirectory(LibAudio) +add_subdirectory(LibC) +add_subdirectory(LibCore) +add_subdirectory(LibCrypto) +add_subdirectory(LibDebug) +add_subdirectory(LibDesktop) +add_subdirectory(LibGfx) +add_subdirectory(LibGUI) +add_subdirectory(LibHTTP) +add_subdirectory(LibIPC) +add_subdirectory(LibJS) +add_subdirectory(LibLine) +add_subdirectory(LibM) +add_subdirectory(LibMarkdown) +add_subdirectory(LibPCIDB) +add_subdirectory(LibProtocol) +add_subdirectory(LibPthread) +add_subdirectory(LibTextCodec) +add_subdirectory(LibThread) +add_subdirectory(LibTLS) +add_subdirectory(LibVT) +add_subdirectory(LibWeb) +add_subdirectory(LibX86) diff --git a/Libraries/LibAudio/CMakeLists.txt b/Libraries/LibAudio/CMakeLists.txt new file mode 100644 index 0000000000..eb0dd9c71f --- /dev/null +++ b/Libraries/LibAudio/CMakeLists.txt @@ -0,0 +1,13 @@ +set(SOURCES + ClientConnection.cpp + WavLoader.cpp + WavWriter.cpp +) + +set(GENERATED_SOURCES + ../../Services/AudioServer/AudioClientEndpoint.h + ../../Services/AudioServer/AudioServerEndpoint.h +) + +serenity_lib(LibAudio audio) +target_link_libraries(LibAudio LibCore LibIPC) diff --git a/Libraries/LibAudio/Makefile b/Libraries/LibAudio/Makefile deleted file mode 100644 index 41e9fd3549..0000000000 --- a/Libraries/LibAudio/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -OBJS = \ - ClientConnection.o \ - WavWriter.o \ - WavLoader.o - -LIBRARY = libaudio.a - -ClientConnection.cpp: ../../Services/AudioServer/AudioClientEndpoint.h -../../Services/AudioServer/AudioClientEndpoint.h: - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibAudio/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibAudio/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibBareMetal/Makefile b/Libraries/LibBareMetal/Makefile deleted file mode 100644 index b09d3f1760..0000000000 --- a/Libraries/LibBareMetal/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibBareMetal/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibBareMetal/Output/ - cp ../LibBareMetal/*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibBareMetal/ - cp ../LibBareMetal/Output/*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibBareMetal/Output/ - -include ../../Makefile.common diff --git a/Libraries/LibC/CMakeLists.txt b/Libraries/LibC/CMakeLists.txt new file mode 100644 index 0000000000..d27a5b4719 --- /dev/null +++ b/Libraries/LibC/CMakeLists.txt @@ -0,0 +1,65 @@ +set(LIBC_SOURCES + arpa/inet.cpp + assert.cpp + crt0.cpp + ctype.cpp + cxxabi.cpp + dirent.cpp + dlfcn.cpp + fcntl.cpp + getopt.cpp + grp.cpp + ioctl.cpp + libcinit.cpp + libgen.cpp + locale.cpp + malloc.cpp + mman.cpp + mntent.cpp + netdb.cpp + poll.cpp + pwd.cpp + qsort.cpp + scanf.cpp + sched.cpp + serenity.cpp + setjmp.S + signal.cpp + stat.cpp + stdio.cpp + stdlib.cpp + string.cpp + strings.cpp + syslog.cpp + sys/ptrace.cpp + sys/select.cpp + sys/socket.cpp + sys/uio.cpp + sys/wait.cpp + termcap.cpp + termios.cpp + time.cpp + times.cpp + ulimit.cpp + unistd.cpp + utime.cpp + utsname.cpp + wchar.cpp +) + +file(GLOB AK_SOURCES "../../AK/*.cpp") +file(GLOB ELF_SOURCES "../LibELF/*.cpp") +set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/i386/plt_trampoline.S) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSERENITY_LIBC_BUILD") + +add_library(crt0 STATIC crt0.cpp) +add_custom_command( + TARGET crt0 + COMMAND install -D $<TARGET_OBJECTS:crt0> ${CMAKE_INSTALL_PREFIX}/usr/lib/crt0.o +) + +set(SOURCES ${LIBC_SOURCES} ${AK_SOURCES} ${ELF_SOURCES}) +serenity_libc(LibC c) +target_link_libraries(LibC crt0) +add_dependencies(LibC LibM) diff --git a/Libraries/LibC/Makefile b/Libraries/LibC/Makefile deleted file mode 100644 index 3b9bb0d8ef..0000000000 --- a/Libraries/LibC/Makefile +++ /dev/null @@ -1,115 +0,0 @@ -AK_OBJS = \ - ../../AK/Base64.o \ - ../../AK/FileSystemPath.o \ - ../../AK/FlyString.o \ - ../../AK/JsonParser.o \ - ../../AK/JsonValue.o \ - ../../AK/LogStream.o \ - ../../AK/MappedFile.o \ - ../../AK/SharedBuffer.o \ - ../../AK/String.o \ - ../../AK/StringBuilder.o \ - ../../AK/StringImpl.o \ - ../../AK/StringUtils.o \ - ../../AK/StringView.o \ - ../../AK/URL.o \ - ../../AK/Utf8View.o - -LIBC_OBJS = \ - stdio.o \ - unistd.o \ - string.o \ - strings.o \ - mman.o \ - dirent.o \ - malloc.o \ - stdlib.o \ - time.o \ - utsname.o \ - assert.o \ - signal.o \ - getopt.o \ - scanf.o \ - pwd.o \ - grp.o \ - times.o \ - termcap.o \ - stat.o \ - mntent.o \ - ctype.o \ - fcntl.o \ - termios.o \ - ulimit.o \ - qsort.o \ - ioctl.o \ - utime.o \ - sys/select.o \ - sys/socket.o \ - sys/wait.o \ - sys/uio.o \ - sys/ptrace.o \ - poll.o \ - locale.o \ - arpa/inet.o \ - netdb.o \ - sched.o \ - dlfcn.o \ - libgen.o \ - wchar.o \ - serenity.o \ - syslog.o \ - cxxabi.o \ - libcinit.o - -ELF_OBJS = \ - ../LibELF/DynamicObject.o \ - ../LibELF/DynamicLoader.o \ - ../LibELF/Loader.o \ - ../LibELF/Image.o \ - ../LibELF/Validation.o - -OBJS = $(AK_OBJS) $(LIBC_OBJS) $(ELF_OBJS) - -EXTRA_OBJS = \ - setjmp.ao \ - crti.ao \ - crtn.ao \ - ../LibELF/Arch/i386/plt_trampoline.ao - -crt0.o: crt0.cpp - -crtio.o: crti.ao - $(QUIET) cp crti.ao crti.o - -crtn.o: crtin.ao - $(QUIET) cp crtn.ao crtn.o - -EXTRA_CLEAN = crt0.d crt0.o - -DEFINES = -DSERENITY_LIBC_BUILD $(EXTRA_LIBC_DEFINES) - -LIBRARY = libc.a - -POST_LIBRARY_BUILD = $(QUIET) $(MAKE) install - -all: crt0.o $(EXTRA_OBJS) $(LIBRARY) - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/sys/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/bits/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/netinet/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/net/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/arpa/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/lib/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/ - cp sys/*.h $(SERENITY_BASE_DIR)/Root/usr/include/sys/ - cp bits/*.h $(SERENITY_BASE_DIR)/Root/usr/include/bits/ - cp arpa/*.h $(SERENITY_BASE_DIR)/Root/usr/include/arpa/ - cp net/*.h $(SERENITY_BASE_DIR)/Root/usr/include/net/ - cp netinet/*.h $(SERENITY_BASE_DIR)/Root/usr/include/netinet/ - cp libc.a $(SERENITY_BASE_DIR)/Root/usr/lib/ - cp crt0.o $(SERENITY_BASE_DIR)/Root/usr/lib/ - cp crti.ao $(SERENITY_BASE_DIR)/Root/usr/lib/crti.o - cp crtn.ao $(SERENITY_BASE_DIR)/Root/usr/lib/crtn.o - -include ../../Makefile.common diff --git a/Libraries/LibCore/CMakeLists.txt b/Libraries/LibCore/CMakeLists.txt new file mode 100644 index 0000000000..3b3662d405 --- /dev/null +++ b/Libraries/LibCore/CMakeLists.txt @@ -0,0 +1,32 @@ +set(SOURCES + ArgsParser.cpp + ConfigFile.cpp + DateTime.cpp + DirIterator.cpp + ElapsedTimer.cpp + Event.cpp + EventLoop.cpp + File.cpp + Gzip.cpp + IODevice.cpp + LocalServer.cpp + LocalSocket.cpp + MimeData.cpp + NetworkJob.cpp + NetworkResponse.cpp + Notifier.cpp + Object.cpp + ProcessStatisticsReader.cpp + puff.c + SocketAddress.cpp + Socket.cpp + StandardPaths.cpp + TCPServer.cpp + TCPSocket.cpp + Timer.cpp + UDPServer.cpp + UDPSocket.cpp +) + +serenity_lib(LibCore core) +target_link_libraries(LibCore LibC) diff --git a/Libraries/LibCore/Makefile b/Libraries/LibCore/Makefile deleted file mode 100644 index d059159c06..0000000000 --- a/Libraries/LibCore/Makefile +++ /dev/null @@ -1,37 +0,0 @@ -OBJS = \ - ArgsParser.o \ - ConfigFile.o \ - DateTime.o \ - DirIterator.o \ - ElapsedTimer.o \ - Event.o \ - EventLoop.o \ - File.o \ - Gzip.o \ - IODevice.o \ - LocalServer.o \ - LocalSocket.o \ - MimeData.o \ - NetworkJob.o \ - NetworkResponse.o \ - Notifier.o \ - Object.o \ - ProcessStatisticsReader.o \ - Socket.o \ - SocketAddress.o \ - StandardPaths.o \ - TCPServer.o \ - TCPSocket.o \ - Timer.o \ - UDPServer.o \ - UDPSocket.o \ - puff.o - -LIBRARY = libcore.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibCore/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibCore/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibCrypto/CMakeLists.txt b/Libraries/LibCrypto/CMakeLists.txt new file mode 100644 index 0000000000..b8306128bb --- /dev/null +++ b/Libraries/LibCrypto/CMakeLists.txt @@ -0,0 +1,11 @@ +set(SOURCES + BigInt/UnsignedBigInteger.cpp + Cipher/AES.cpp + Hash/MD5.cpp + Hash/SHA1.cpp + Hash/SHA2.cpp + PK/RSA.cpp +) + +serenity_lib(LibCrypto crypto) +target_link_libraries(LibCrypto LibC) diff --git a/Libraries/LibCrypto/Makefile b/Libraries/LibCrypto/Makefile deleted file mode 100644 index 4d35735b3d..0000000000 --- a/Libraries/LibCrypto/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -LIBCRYPTO_OBJS = \ - Cipher/AES.o \ - Hash/MD5.o \ - Hash/SHA1.o \ - Hash/SHA2.o \ - PK/RSA.o \ - BigInt/UnsignedBigInteger.o - -OBJS = $(LIBCRYPTO_OBJS) - -LIBRARY = libcrypto.a - -install: - for dir in . Cipher Cipher/Mode Hash PK PK/Code; do \ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibCrypto/$$dir; \ - cp $$dir/*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibCrypto/$$dir/; \ - done - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common - -include ../../Makefile.subdir diff --git a/Libraries/LibDebug/CMakeLists.txt b/Libraries/LibDebug/CMakeLists.txt new file mode 100644 index 0000000000..ad2f1bfb15 --- /dev/null +++ b/Libraries/LibDebug/CMakeLists.txt @@ -0,0 +1,13 @@ +set(SOURCES + DebugInfo.cpp + DebugSession.cpp + Dwarf/AbbreviationsMap.cpp + Dwarf/CompilationUnit.cpp + Dwarf/DIE.cpp + Dwarf/DwarfInfo.cpp + Dwarf/Expression.cpp + Dwarf/LineProgram.cpp +) + +serenity_lib(LibDebug debug) +target_link_libraries(LibDebug LibC) diff --git a/Libraries/LibDebug/Makefile b/Libraries/LibDebug/Makefile deleted file mode 100644 index e6f37a9d1a..0000000000 --- a/Libraries/LibDebug/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -OBJS = \ - DebugSession.o \ - DebugInfo.o \ - Dwarf/LineProgram.o \ - Dwarf/DwarfInfo.o \ - Dwarf/CompilationUnit.o \ - Dwarf/AbbreviationsMap.o \ - Dwarf/Expression.o \ - Dwarf/DIE.o \ - - -LIBRARY = libdebug.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibDebug/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibDebug/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibDesktop/CMakeLists.txt b/Libraries/LibDesktop/CMakeLists.txt new file mode 100644 index 0000000000..2b01bc2734 --- /dev/null +++ b/Libraries/LibDesktop/CMakeLists.txt @@ -0,0 +1,11 @@ +set(SOURCES + Launcher.cpp +) + +set(GENERATED_SOURCES + ../../Services/LaunchServer/LaunchClientEndpoint.h + ../../Services/LaunchServer/LaunchServerEndpoint.h +) + +serenity_lib(LibDesktop desktop) +target_link_libraries(LibDesktop LibIPC) diff --git a/Libraries/LibDesktop/Makefile b/Libraries/LibDesktop/Makefile deleted file mode 100644 index c96b8160d5..0000000000 --- a/Libraries/LibDesktop/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -OBJS = \ - Launcher.o - -LIBRARY = libdesktop.a - -# HACK: LaunchServer builds after LibDesktop so we need to explicitly generate these IPC headers -Launcher.cpp: ../../Services/LaunchServer/LaunchServerEndpoint.h ../../Services/LaunchServer/LaunchClientEndpoint.h - -../../Services/LaunchServer/LaunchServerEndpoint.h: - $(MAKE) -C $(dir $(@)) LaunchServerEndpoint.h - -../../Services/LaunchServer/LaunchClientEndpoint.h: - $(MAKE) -C $(dir $(@)) LaunchClientEndpoint.h - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibDesktop/ - cp ./*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibDesktop/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibELF/Makefile b/Libraries/LibELF/Makefile deleted file mode 100644 index 720752f1eb..0000000000 --- a/Libraries/LibELF/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.common diff --git a/Libraries/LibGUI/CMakeLists.txt b/Libraries/LibGUI/CMakeLists.txt new file mode 100644 index 0000000000..3df083b187 --- /dev/null +++ b/Libraries/LibGUI/CMakeLists.txt @@ -0,0 +1,87 @@ +set(SOURCES + AboutDialog.cpp + AbstractButton.cpp + AbstractTableView.cpp + AbstractView.cpp + Action.cpp + ActionGroup.cpp + Application.cpp + BoxLayout.cpp + Button.cpp + CheckBox.cpp + Clipboard.cpp + ColorInput.cpp + ColorPicker.cpp + ColumnsView.cpp + ComboBox.cpp + Command.cpp + CppLexer.cpp + CppSyntaxHighlighter.cpp + Desktop.cpp + Dialog.cpp + DisplayLink.cpp + DragOperation.cpp + Event.cpp + FilePicker.cpp + FileSystemModel.cpp + FontDatabase.cpp + Frame.cpp + GroupBox.cpp + Icon.cpp + IconView.cpp + INILexer.cpp + INISyntaxHighlighter.cpp + InputBox.cpp + JsonArrayModel.cpp + JSSyntaxHighlighter.cpp + Label.cpp + Layout.cpp + LazyWidget.cpp + ListView.cpp + MenuBar.cpp + Menu.cpp + MenuItem.cpp + MessageBox.cpp + Model.cpp + ModelIndex.cpp + ModelSelection.cpp + MultiView.cpp + Notification.cpp + Painter.cpp + ProgressBar.cpp + RadioButton.cpp + ResizeCorner.cpp + ScrollableWidget.cpp + ScrollBar.cpp + Shortcut.cpp + Slider.cpp + SortingProxyModel.cpp + SpinBox.cpp + Splitter.cpp + StackWidget.cpp + StatusBar.cpp + SyntaxHighlighter.cpp + TableView.cpp + TabWidget.cpp + TextBox.cpp + TextDocument.cpp + TextEditor.cpp + ToolBarContainer.cpp + ToolBar.cpp + TreeView.cpp + UndoStack.cpp + Variant.cpp + Widget.cpp + Window.cpp + WindowServerConnection.cpp +) + +set(GENERATED_SOURCES + ../../Services/WindowServer/WindowClientEndpoint.h + ../../Services/WindowServer/WindowServerEndpoint.h + ../../Services/NotificationServer/NotificationClientEndpoint.h + ../../Services/NotificationServer/NotificationServerEndpoint.h +) + +serenity_lib(LibGUI gui) +target_link_libraries(LibGUI LibCore LibGfx LibIPC LibThread) diff --git a/Libraries/LibGUI/Makefile b/Libraries/LibGUI/Makefile deleted file mode 100644 index bbb1327472..0000000000 --- a/Libraries/LibGUI/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -OBJS = \ - AboutDialog.o \ - AbstractButton.o \ - AbstractTableView.o \ - AbstractView.o \ - Action.o \ - ActionGroup.o \ - Application.o \ - BoxLayout.o \ - Button.o \ - CheckBox.o \ - Clipboard.o \ - ColorInput.o \ - ColorPicker.o \ - ColumnsView.o \ - ComboBox.o \ - Command.o \ - CppLexer.o \ - CppSyntaxHighlighter.o \ - Desktop.o \ - Dialog.o \ - DisplayLink.o \ - DragOperation.o \ - Event.o \ - FilePicker.o \ - FileSystemModel.o \ - FontDatabase.o \ - Frame.o \ - GroupBox.o \ - Icon.o \ - IconView.o \ - InputBox.o \ - INILexer.o \ - INISyntaxHighlighter.o \ - JsonArrayModel.o \ - JSSyntaxHighlighter.o \ - Label.o \ - Layout.o \ - LazyWidget.o \ - ListView.o \ - Menu.o \ - MenuBar.o \ - MenuItem.o \ - MessageBox.o \ - Model.o \ - ModelIndex.o \ - ModelSelection.o \ - MultiView.o \ - Notification.o \ - Painter.o \ - ProgressBar.o \ - RadioButton.o \ - ResizeCorner.o \ - ScrollBar.o \ - ScrollableWidget.o \ - Shortcut.o \ - Slider.o \ - SortingProxyModel.o \ - SpinBox.o \ - Splitter.o \ - StackWidget.o \ - StatusBar.o \ - SyntaxHighlighter.o \ - TabWidget.o \ - TableView.o \ - TextBox.o \ - TextDocument.o \ - TextEditor.o \ - ToolBar.o \ - ToolBarContainer.o \ - TreeView.o \ - UndoStack.o \ - Variant.o \ - Widget.o \ - Window.o \ - WindowServerConnection.o - -LIBRARY = libgui.a - -Application.cpp: ../../Services/WindowServer/WindowServerEndpoint.h - -../../Services/WindowServer/WindowServerEndpoint.h: - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -# HACK: NotificationServer depends on LibGUI so we don't flock for these.. -Notification.cpp: ../../Services/NotificationServer/NotificationServerEndpoint.h ../../Services/NotificationServer/NotificationClientEndpoint.h - -../../Services/NotificationServer/NotificationServerEndpoint.h: - $(MAKE) -C $(dir $(@)) NotificationServerEndpoint.h - -../../Services/NotificationServer/NotificationClientEndpoint.h: - $(MAKE) -C $(dir $(@)) NotificationClientEndpoint.h - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibGUI/ - cp ./*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibGUI/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibGfx/CMakeLists.txt b/Libraries/LibGfx/CMakeLists.txt new file mode 100644 index 0000000000..3ab00d506c --- /dev/null +++ b/Libraries/LibGfx/CMakeLists.txt @@ -0,0 +1,26 @@ +set(SOURCES + AffineTransform.cpp + Bitmap.cpp + CharacterBitmap.cpp + Color.cpp + DisjointRectSet.cpp + Emoji.cpp + FloatRect.cpp + Font.cpp + GIFLoader.cpp + ImageDecoder.cpp + Painter.cpp + Palette.cpp + Path.cpp + PNGLoader.cpp + Point.cpp + Rect.cpp + ShareableBitmap.cpp + Size.cpp + StylePainter.cpp + SystemTheme.cpp + Triangle.cpp +) + +serenity_lib(LibGfx gfx) +target_link_libraries(LibGfx LibM LibCore) diff --git a/Libraries/LibGfx/Makefile b/Libraries/LibGfx/Makefile deleted file mode 100644 index 8f8833d811..0000000000 --- a/Libraries/LibGfx/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -OBJS = \ - AffineTransform.o \ - Bitmap.o \ - CharacterBitmap.o \ - Color.o \ - DisjointRectSet.o \ - Emoji.o \ - Font.o \ - FloatRect.o \ - GIFLoader.o \ - ImageDecoder.o \ - PNGLoader.o \ - Painter.o \ - Palette.o \ - Path.o \ - Point.o \ - Rect.o \ - ShareableBitmap.o \ - Size.o \ - StylePainter.o \ - SystemTheme.o \ - Triangle.o - -LIBRARY = libgfx.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibGfx/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibGfx/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibHTTP/CMakeLists.txt b/Libraries/LibHTTP/CMakeLists.txt new file mode 100644 index 0000000000..57c79b55e2 --- /dev/null +++ b/Libraries/LibHTTP/CMakeLists.txt @@ -0,0 +1,10 @@ +set(SOURCES + HttpJob.cpp + HttpRequest.cpp + HttpResponse.cpp + HttpsJob.cpp + Job.cpp +) + +serenity_lib(LibHTTP http) +target_link_libraries(LibHTTP LibCore LibTLS) diff --git a/Libraries/LibHTTP/Makefile b/Libraries/LibHTTP/Makefile deleted file mode 100644 index 9aa02a4a13..0000000000 --- a/Libraries/LibHTTP/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -OBJS = HttpResponse.o \ - HttpRequest.o \ - HttpJob.o \ - HttpsJob.o \ - Job.o - -LIBRARY = libhttp.a - -LIB_DEPS = Core - -POST_LIBRARY_BUILD = $(QUIET) $(MAKE) install - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/sys/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/lib/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibIPC/CMakeLists.txt b/Libraries/LibIPC/CMakeLists.txt new file mode 100644 index 0000000000..ea1a23640e --- /dev/null +++ b/Libraries/LibIPC/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + Decoder.cpp + Encoder.cpp + Endpoint.cpp + Message.cpp +) + +serenity_lib(LibIPC ipc) +target_link_libraries(LibIPC LibC LibCore) diff --git a/Libraries/LibIPC/Makefile b/Libraries/LibIPC/Makefile deleted file mode 100644 index 38595cced0..0000000000 --- a/Libraries/LibIPC/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -OBJS = \ - Decoder.o \ - Encoder.o \ - Endpoint.o \ - Message.o - -LIBRARY = libipc.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibIPC/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibIPC/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibJS/CMakeLists.txt b/Libraries/LibJS/CMakeLists.txt new file mode 100644 index 0000000000..11c4608282 --- /dev/null +++ b/Libraries/LibJS/CMakeLists.txt @@ -0,0 +1,55 @@ +set(SOURCES + AST.cpp + Console.cpp + Heap/Handle.cpp + Heap/HeapBlock.cpp + Heap/Heap.cpp + Interpreter.cpp + Lexer.cpp + Parser.cpp + Runtime/ArrayConstructor.cpp + Runtime/Array.cpp + Runtime/ArrayPrototype.cpp + Runtime/BooleanConstructor.cpp + Runtime/BooleanObject.cpp + Runtime/BooleanPrototype.cpp + Runtime/BoundFunction.cpp + Runtime/Cell.cpp + Runtime/ConsoleObject.cpp + Runtime/DateConstructor.cpp + Runtime/Date.cpp + Runtime/DatePrototype.cpp + Runtime/ErrorConstructor.cpp + Runtime/Error.cpp + Runtime/ErrorPrototype.cpp + Runtime/Exception.cpp + Runtime/FunctionConstructor.cpp + Runtime/Function.cpp + Runtime/FunctionPrototype.cpp + Runtime/GlobalObject.cpp + Runtime/LexicalEnvironment.cpp + Runtime/MarkedValueList.cpp + Runtime/MathObject.cpp + Runtime/NativeFunction.cpp + Runtime/NativeProperty.cpp + Runtime/NumberConstructor.cpp + Runtime/NumberObject.cpp + Runtime/NumberPrototype.cpp + Runtime/ObjectConstructor.cpp + Runtime/Object.cpp + Runtime/ObjectPrototype.cpp + Runtime/PrimitiveString.cpp + Runtime/Reference.cpp + Runtime/ReflectObject.cpp + Runtime/ScriptFunction.cpp + Runtime/Shape.cpp + Runtime/StringConstructor.cpp + Runtime/StringObject.cpp + Runtime/StringPrototype.cpp + Runtime/Uint8ClampedArray.cpp + Runtime/Value.cpp + Token.cpp +) + +serenity_lib(LibJS js) +target_link_libraries(LibJS LibM LibCore) diff --git a/Libraries/LibJS/Makefile b/Libraries/LibJS/Makefile deleted file mode 100644 index aaae3b10f4..0000000000 --- a/Libraries/LibJS/Makefile +++ /dev/null @@ -1,60 +0,0 @@ -OBJS = \ - AST.o \ - Console.o \ - Heap/Handle.o \ - Heap/Heap.o \ - Heap/HeapBlock.o \ - Interpreter.o \ - Lexer.o \ - Parser.o \ - Runtime/Array.o \ - Runtime/ArrayConstructor.o \ - Runtime/ArrayPrototype.o \ - Runtime/BooleanConstructor.o \ - Runtime/BooleanObject.o \ - Runtime/BooleanPrototype.o \ - Runtime/BoundFunction.o \ - Runtime/Cell.o \ - Runtime/ConsoleObject.o \ - Runtime/Date.o \ - Runtime/DateConstructor.o \ - Runtime/DatePrototype.o \ - Runtime/Error.o \ - Runtime/ErrorConstructor.o \ - Runtime/ErrorPrototype.o \ - Runtime/Exception.o \ - Runtime/Function.o \ - Runtime/FunctionConstructor.o \ - Runtime/FunctionPrototype.o \ - Runtime/GlobalObject.o \ - Runtime/LexicalEnvironment.o \ - Runtime/MathObject.o \ - Runtime/MarkedValueList.o \ - Runtime/NativeFunction.o \ - Runtime/NativeProperty.o \ - Runtime/NumberConstructor.o \ - Runtime/NumberObject.o \ - Runtime/NumberPrototype.o \ - Runtime/Object.o \ - Runtime/ObjectConstructor.o \ - Runtime/ObjectPrototype.o \ - Runtime/PrimitiveString.o \ - Runtime/Reference.o \ - Runtime/ReflectObject.o \ - Runtime/ScriptFunction.o \ - Runtime/Shape.o \ - Runtime/StringConstructor.o \ - Runtime/StringObject.o \ - Runtime/StringPrototype.o \ - Runtime/Uint8ClampedArray.o \ - Runtime/Value.o \ - Token.o - -LIBRARY = libjs.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibJS/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibJS/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibJS/Tests/run-tests b/Libraries/LibJS/Tests/run-tests.sh index 131296c805..fdc9b68a57 100755 --- a/Libraries/LibJS/Tests/run-tests +++ b/Libraries/LibJS/Tests/run-tests.sh @@ -3,7 +3,7 @@ if [ "$(uname)" = "SerenityOS" ]; then js_program=/bin/js else - [ -z "$js_program" ] && js_program="$SERENITY_ROOT/Meta/Lagom/build/js" + [ -z "$js_program" ] && js_program="$SERENITY_ROOT/Build/Meta/Lagom/js" # Enable back traces if sanitizers are enabled export UBSAN_OPTIONS=print_stacktrace=1 diff --git a/Libraries/LibLine/CMakeLists.txt b/Libraries/LibLine/CMakeLists.txt new file mode 100644 index 0000000000..91fb113d3d --- /dev/null +++ b/Libraries/LibLine/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Editor.cpp +) + +serenity_lib(LibLine line) +target_link_libraries(LibLine LibC LibCore) diff --git a/Libraries/LibLine/Editor.h b/Libraries/LibLine/Editor.h index 384966e0bd..ea94eedc11 100644 --- a/Libraries/LibLine/Editor.h +++ b/Libraries/LibLine/Editor.h @@ -36,8 +36,8 @@ #include <AK/String.h> #include <AK/Vector.h> #include <LibCore/DirIterator.h> -#include <Libraries/LibLine/Span.h> -#include <Libraries/LibLine/Style.h> +#include <LibLine/Span.h> +#include <LibLine/Style.h> #include <sys/stat.h> #include <termios.h> diff --git a/Libraries/LibLine/Makefile b/Libraries/LibLine/Makefile deleted file mode 100644 index c191cab07a..0000000000 --- a/Libraries/LibLine/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -OBJS = Editor.o - -LIBRARY = libline.a - -include ../../Makefile.common diff --git a/Libraries/LibM/CMakeLists.txt b/Libraries/LibM/CMakeLists.txt new file mode 100644 index 0000000000..7ed9959738 --- /dev/null +++ b/Libraries/LibM/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + math.cpp +) + +serenity_libc(LibM m) +target_include_directories(LibM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(LibM LibC) diff --git a/Libraries/LibM/Makefile b/Libraries/LibM/Makefile deleted file mode 100644 index c5d2716cfd..0000000000 --- a/Libraries/LibM/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -OBJS = math.o - -LIBRARY = libm.a - -POST_LIBRARY_BUILD = $(QUIET) $(MAKE) install - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/sys/ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/lib/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibMarkdown/CMakeLists.txt b/Libraries/LibMarkdown/CMakeLists.txt new file mode 100644 index 0000000000..41c484cd0d --- /dev/null +++ b/Libraries/LibMarkdown/CMakeLists.txt @@ -0,0 +1,11 @@ +set(SOURCES + CodeBlock.cpp + Document.cpp + Heading.cpp + List.cpp + Paragraph.cpp + Text.cpp +) + +serenity_lib(LibMarkdown markdown) +target_link_libraries(LibMarkdown LibC) diff --git a/Libraries/LibMarkdown/Makefile b/Libraries/LibMarkdown/Makefile deleted file mode 100644 index b234cb7da5..0000000000 --- a/Libraries/LibMarkdown/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -OBJS = \ - Document.o \ - Paragraph.o \ - Heading.o \ - CodeBlock.o \ - List.o \ - Text.o - -LIBRARY = libmarkdown.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibMarkdown/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibMarkdown/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibPCIDB/CMakeLists.txt b/Libraries/LibPCIDB/CMakeLists.txt new file mode 100644 index 0000000000..07dd0a2f08 --- /dev/null +++ b/Libraries/LibPCIDB/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Database.cpp +) + +serenity_lib(LibPCIDB pcidb) +target_link_libraries(LibPCIDB LibC) diff --git a/Libraries/LibPCIDB/Makefile b/Libraries/LibPCIDB/Makefile deleted file mode 100644 index 9f8c27f86b..0000000000 --- a/Libraries/LibPCIDB/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - Database.o - -LIBRARY = libpcidb.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibPCIDB/ - cp ./*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibPCIDB/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibProtocol/CMakeLists.txt b/Libraries/LibProtocol/CMakeLists.txt new file mode 100644 index 0000000000..7c2e59d45d --- /dev/null +++ b/Libraries/LibProtocol/CMakeLists.txt @@ -0,0 +1,12 @@ +set(SOURCES + Client.cpp + Download.cpp +) + +set(GENERATED_SOURCES + ../../Services/ProtocolServer/ProtocolClientEndpoint.h + ../../Services/ProtocolServer/ProtocolServerEndpoint.h +) + +serenity_lib(LibProtocol protocol) +target_link_libraries(LibProtocol LibIPC) diff --git a/Libraries/LibProtocol/Makefile b/Libraries/LibProtocol/Makefile deleted file mode 100644 index 00b3605fb6..0000000000 --- a/Libraries/LibProtocol/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - Download.o \ - Client.o - -LIBRARY = libprotocol.a - -Download.cpp Client.cpp: ../../Services/ProtocolServer/ProtocolClientEndpoint.h ../../Services/ProtocolServer/ProtocolServerEndpoint.h -../../Services/ProtocolServer/ProtocolClientEndpoint.h ../../Services/ProtocolServer/ProtocolServerEndpoint.h: - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -include ../../Makefile.common diff --git a/Libraries/LibPthread/CMakeLists.txt b/Libraries/LibPthread/CMakeLists.txt new file mode 100644 index 0000000000..7a668f0684 --- /dev/null +++ b/Libraries/LibPthread/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + pthread.cpp +) + +serenity_libc(LibPthread pthread) +target_link_libraries(LibPthread LibC) +target_include_directories(LibPthread PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Libraries/LibPthread/Makefile b/Libraries/LibPthread/Makefile deleted file mode 100644 index 9c4df9351d..0000000000 --- a/Libraries/LibPthread/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = pthread.o - -LIBRARY = libpthread.a - -POST_LIBRARY_BUILD = $(QUIET) $(MAKE) install - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/lib/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibTLS/CMakeLists.txt b/Libraries/LibTLS/CMakeLists.txt new file mode 100644 index 0000000000..e4194ac456 --- /dev/null +++ b/Libraries/LibTLS/CMakeLists.txt @@ -0,0 +1,11 @@ +set(SOURCES + ClientHandshake.cpp + Exchange.cpp + Handshake.cpp + Record.cpp + Socket.cpp + TLSv12.cpp +) + +serenity_lib(LibTLS tls) +target_link_libraries(LibTLS LibCore LibCrypto) diff --git a/Libraries/LibTLS/Makefile b/Libraries/LibTLS/Makefile deleted file mode 100644 index f138bd517d..0000000000 --- a/Libraries/LibTLS/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -LIBTLS_OBJS = TLSv12.o \ - ClientHandshake.o \ - Exchange.o \ - Handshake.o \ - Record.o \ - Socket.o - -OBJS = $(LIBTLS_OBJS) - -LIBRARY = libtls.a - -install: - for dir in .; do \ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibTLS/$$dir; \ - cp $$dir/*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibTLS/$$dir/; \ - done - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common - -include ../../Makefile.subdir diff --git a/Libraries/LibTextCodec/CMakeLists.txt b/Libraries/LibTextCodec/CMakeLists.txt new file mode 100644 index 0000000000..f99a6caa03 --- /dev/null +++ b/Libraries/LibTextCodec/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Decoder.cpp +) + +serenity_lib(LibTextCodec textcodec) +target_link_libraries(LibTextCodec LibC) diff --git a/Libraries/LibTextCodec/Makefile b/Libraries/LibTextCodec/Makefile deleted file mode 100644 index 7d80b9273a..0000000000 --- a/Libraries/LibTextCodec/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -OBJS = \ - Decoder.o - -LIBRARY = libtextcodec.a - -install: - for dir in .; do \ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibTextCodec/$$dir; \ - cp $$dir/*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibTextCodec/$$dir/; \ - done - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common - -include ../../Makefile.subdir diff --git a/Libraries/LibThread/CMakeLists.txt b/Libraries/LibThread/CMakeLists.txt new file mode 100644 index 0000000000..6bfce1c060 --- /dev/null +++ b/Libraries/LibThread/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + BackgroundAction.cpp + Thread.cpp +) + +serenity_lib(LibThread thread) +target_link_libraries(LibThread LibC LibCore LibPthread) diff --git a/Libraries/LibThread/Makefile b/Libraries/LibThread/Makefile deleted file mode 100644 index 57c2ae93b5..0000000000 --- a/Libraries/LibThread/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = \ - Thread.o \ - BackgroundAction.o - -LIBRARY = libthread.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibThread/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibThread/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/LibVT/CMakeLists.txt b/Libraries/LibVT/CMakeLists.txt new file mode 100644 index 0000000000..78f0772731 --- /dev/null +++ b/Libraries/LibVT/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + Terminal.cpp + TerminalWidget.cpp +) + +serenity_lib(LibVT vt) +target_link_libraries(LibVT LibC LibCore LibGUI LibGfx LibDesktop) diff --git a/Libraries/LibVT/Makefile b/Libraries/LibVT/Makefile deleted file mode 100644 index 7aefbbb078..0000000000 --- a/Libraries/LibVT/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS = \ - Terminal.o \ - TerminalWidget.o - -LIBRARY = libvt.a - -include ../../Makefile.common diff --git a/Libraries/LibWeb/CMakeLists.txt b/Libraries/LibWeb/CMakeLists.txt new file mode 100644 index 0000000000..583de808b5 --- /dev/null +++ b/Libraries/LibWeb/CMakeLists.txt @@ -0,0 +1,131 @@ +set(SOURCES + Bindings/CanvasRenderingContext2DWrapper.cpp + Bindings/DocumentWrapper.cpp + Bindings/ElementWrapper.cpp + Bindings/EventListenerWrapper.cpp + Bindings/EventTargetWrapper.cpp + Bindings/EventWrapper.cpp + Bindings/HTMLCanvasElementWrapper.cpp + Bindings/HTMLImageElementWrapper.cpp + Bindings/ImageDataWrapper.cpp + Bindings/MouseEventWrapper.cpp + Bindings/NavigatorObject.cpp + Bindings/NodeWrapper.cpp + Bindings/WindowObject.cpp + Bindings/Wrappable.cpp + Bindings/XMLHttpRequestConstructor.cpp + Bindings/XMLHttpRequestPrototype.cpp + Bindings/XMLHttpRequestWrapper.cpp + CSS/Selector.cpp + CSS/SelectorEngine.cpp + CSS/StyleDeclaration.cpp + CSS/StyleProperties.cpp + CSS/StyleResolver.cpp + CSS/StyleRule.cpp + CSS/StyleSheet.cpp + CSS/StyleValue.cpp + DOM/CanvasRenderingContext2D.cpp + DOM/CharacterData.cpp + DOM/Comment.cpp + DOM/Document.cpp + DOM/DocumentType.cpp + DOM/Element.cpp + DOM/ElementFactory.cpp + DOM/EventListener.cpp + DOM/EventTarget.cpp + DOM/HTMLAnchorElement.cpp + DOM/HTMLBlinkElement.cpp + DOM/HTMLBodyElement.cpp + DOM/HTMLBRElement.cpp + DOM/HTMLCanvasElement.cpp + DOM/HTMLElement.cpp + DOM/HTMLFontElement.cpp + DOM/HTMLFormElement.cpp + DOM/HTMLHeadElement.cpp + DOM/HTMLHeadingElement.cpp + DOM/HTMLHRElement.cpp + DOM/HTMLHtmlElement.cpp + DOM/HTMLImageElement.cpp + DOM/HTMLInputElement.cpp + DOM/HTMLLinkElement.cpp + DOM/HTMLScriptElement.cpp + DOM/HTMLStyleElement.cpp + DOM/HTMLTitleElement.cpp + DOM/ImageData.cpp + DOM/Node.cpp + DOM/ParentNode.cpp + DOM/Text.cpp + DOMTreeModel.cpp + DOM/Window.cpp + DOM/XMLHttpRequest.cpp + Dump.cpp + FontCache.cpp + Frame.cpp + HtmlView.cpp + Layout/BoxModelMetrics.cpp + Layout/LayoutBlock.cpp + Layout/LayoutBox.cpp + Layout/LayoutBreak.cpp + Layout/LayoutCanvas.cpp + Layout/LayoutDocument.cpp + Layout/LayoutImage.cpp + Layout/LayoutInline.cpp + Layout/LayoutListItem.cpp + Layout/LayoutListItemMarker.cpp + Layout/LayoutNode.cpp + Layout/LayoutReplaced.cpp + Layout/LayoutTableCell.cpp + Layout/LayoutTable.cpp + Layout/LayoutTableRow.cpp + Layout/LayoutText.cpp + Layout/LayoutTreeBuilder.cpp + Layout/LayoutWidget.cpp + Layout/LineBox.cpp + Layout/LineBoxFragment.cpp + Parser/CSSParser.cpp + Parser/HTMLParser.cpp + ResourceLoader.cpp + StylePropertiesModel.cpp + URLEncoder.cpp + + CSS/PropertyID.h + CSS/PropertyID.cpp + CSS/DefaultStyleSheetSource.cpp +) + +set(GENERATED_SOURCES + ../../Services/ProtocolServer/ProtocolClientEndpoint.h + ../../Services/ProtocolServer/ProtocolServerEndpoint.h +) + +add_custom_command( + OUTPUT CSS/PropertyID.h + COMMAND /bin/mkdir -p CSS + COMMAND Generate_CSS_PropertyID_h ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Properties.json > CSS/PropertyID.h + VERBATIM + DEPENDS Generate_CSS_PropertyID_h + MAIN_DEPENDENCY CSS/Properties.json +) +add_custom_target(generate_PropertyID.h DEPENDS CSS/PropertyID.h) + +add_custom_command( + OUTPUT CSS/PropertyID.cpp + COMMAND /bin/mkdir -p CSS + COMMAND Generate_CSS_PropertyID_cpp ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Properties.json > CSS/PropertyID.cpp + VERBATIM + DEPENDS Generate_CSS_PropertyID_cpp + MAIN_DEPENDENCY CSS/Properties.json +) + +add_custom_command( + OUTPUT CSS/DefaultStyleSheetSource.cpp + COMMAND /bin/mkdir -p CSS + COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Scripts/GenerateStyleSheetSource.sh default_stylesheet_source + ${CMAKE_CURRENT_SOURCE_DIR}/CSS/Default.css > CSS/DefaultStyleSheetSource.cpp + VERBATIM + DEPENDS Scripts/GenerateStyleSheetSource.sh + MAIN_DEPENDENCY CSS/Default.css +) + +serenity_lib(LibWeb web) +target_link_libraries(LibWeb LibCore LibJS LibMarkdown LibGUI LibGfx LibTextCodec LibProtocol) diff --git a/Libraries/LibWeb/CodeGenerators/CMakeLists.txt b/Libraries/LibWeb/CodeGenerators/CMakeLists.txt new file mode 100644 index 0000000000..132ddc54e3 --- /dev/null +++ b/Libraries/LibWeb/CodeGenerators/CMakeLists.txt @@ -0,0 +1,4 @@ +add_executable(Generate_CSS_PropertyID_h Generate_CSS_PropertyID_h.cpp) +add_executable(Generate_CSS_PropertyID_cpp Generate_CSS_PropertyID_cpp.cpp) +target_link_libraries(Generate_CSS_PropertyID_h LagomCore) +target_link_libraries(Generate_CSS_PropertyID_cpp LagomCore) diff --git a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp/Generate_CSS_PropertyID_cpp.cpp b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp index 9891d6bae4..9891d6bae4 100644 --- a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp/Generate_CSS_PropertyID_cpp.cpp +++ b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp.cpp diff --git a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp/Makefile b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp/Makefile deleted file mode 100644 index de2039f8da..0000000000 --- a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_cpp/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -USE_HOST_CXX = 1 - -PROGRAM = Generate_CSS_PropertyID_cpp - -OBJS = \ - Generate_CSS_PropertyID_cpp.o \ - ../../../../AK/FlyString.o \ - ../../../../AK/JsonParser.o \ - ../../../../AK/JsonValue.o \ - ../../../../AK/LogStream.o \ - ../../../../AK/String.o \ - ../../../../AK/StringBuilder.o \ - ../../../../AK/StringImpl.o \ - ../../../../AK/StringUtils.o \ - ../../../../AK/StringView.o \ - ../../../../Libraries/LibCore/IODevice.o \ - ../../../../Libraries/LibCore/File.o \ - ../../../../Libraries/LibCore/Object.o \ - ../../../../Libraries/LibCore/Event.o \ - ../../../../Libraries/LibCore/Socket.o \ - ../../../../Libraries/LibCore/LocalSocket.o \ - ../../../../Libraries/LibCore/Notifier.o \ - ../../../../Libraries/LibCore/LocalServer.o \ - ../../../../Libraries/LibCore/EventLoop.o - -include ../../../../Makefile.common diff --git a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h/Generate_CSS_PropertyID_h.cpp b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp index 04cd3d9278..04cd3d9278 100644 --- a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h/Generate_CSS_PropertyID_h.cpp +++ b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h.cpp diff --git a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h/Makefile b/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h/Makefile deleted file mode 100644 index b51266128f..0000000000 --- a/Libraries/LibWeb/CodeGenerators/Generate_CSS_PropertyID_h/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -USE_HOST_CXX = 1 - -PROGRAM = Generate_CSS_PropertyID_h - -OBJS = \ - Generate_CSS_PropertyID_h.o \ - ../../../../AK/FlyString.o \ - ../../../../AK/JsonParser.o \ - ../../../../AK/JsonValue.o \ - ../../../../AK/LogStream.o \ - ../../../../AK/String.o \ - ../../../../AK/StringBuilder.o \ - ../../../../AK/StringImpl.o \ - ../../../../AK/StringUtils.o \ - ../../../../AK/StringView.o \ - ../../../../Libraries/LibCore/IODevice.o \ - ../../../../Libraries/LibCore/File.o \ - ../../../../Libraries/LibCore/Object.o \ - ../../../../Libraries/LibCore/Event.o \ - ../../../../Libraries/LibCore/Socket.o \ - ../../../../Libraries/LibCore/LocalSocket.o \ - ../../../../Libraries/LibCore/Notifier.o \ - ../../../../Libraries/LibCore/LocalServer.o \ - ../../../../Libraries/LibCore/EventLoop.o - -include ../../../../Makefile.common diff --git a/Libraries/LibWeb/CodeGenerators/Makefile b/Libraries/LibWeb/CodeGenerators/Makefile deleted file mode 100644 index 29af0b03ea..0000000000 --- a/Libraries/LibWeb/CodeGenerators/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(wildcard */.) - -include ../../../Makefile.subdir diff --git a/Libraries/LibWeb/Makefile b/Libraries/LibWeb/Makefile deleted file mode 100644 index 65ab3ea91f..0000000000 --- a/Libraries/LibWeb/Makefile +++ /dev/null @@ -1,140 +0,0 @@ -LIBWEB_OBJS = \ - Bindings/CanvasRenderingContext2DWrapper.o \ - Bindings/DocumentWrapper.o \ - Bindings/ElementWrapper.o \ - Bindings/EventWrapper.o \ - Bindings/EventListenerWrapper.o \ - Bindings/EventTargetWrapper.o \ - Bindings/HTMLCanvasElementWrapper.o \ - Bindings/HTMLImageElementWrapper.o \ - Bindings/ImageDataWrapper.o \ - Bindings/MouseEventWrapper.o \ - Bindings/NavigatorObject.o \ - Bindings/NodeWrapper.o \ - Bindings/WindowObject.o \ - Bindings/Wrappable.o \ - Bindings/XMLHttpRequestConstructor.o \ - Bindings/XMLHttpRequestPrototype.o \ - Bindings/XMLHttpRequestWrapper.o \ - CSS/DefaultStyleSheetSource.o \ - CSS/PropertyID.o \ - CSS/Selector.o \ - CSS/SelectorEngine.o \ - CSS/StyleDeclaration.o \ - CSS/StyleProperties.o \ - CSS/StyleResolver.o \ - CSS/StyleRule.o \ - CSS/StyleSheet.o \ - CSS/StyleValue.o \ - DOM/CanvasRenderingContext2D.o \ - DOM/CharacterData.o \ - DOM/Comment.o \ - DOM/Document.o \ - DOM/DocumentType.o \ - DOM/Element.o \ - DOM/ElementFactory.o \ - DOM/EventListener.o \ - DOM/EventTarget.o \ - DOM/HTMLAnchorElement.o \ - DOM/HTMLBRElement.o \ - DOM/HTMLBlinkElement.o \ - DOM/HTMLBodyElement.o \ - DOM/HTMLCanvasElement.o \ - DOM/HTMLElement.o \ - DOM/HTMLFontElement.o \ - DOM/HTMLFormElement.o \ - DOM/HTMLHRElement.o \ - DOM/HTMLHeadElement.o \ - DOM/HTMLHeadingElement.o \ - DOM/HTMLHtmlElement.o \ - DOM/HTMLImageElement.o \ - DOM/HTMLInputElement.o \ - DOM/HTMLLinkElement.o \ - DOM/HTMLScriptElement.o \ - DOM/HTMLStyleElement.o \ - DOM/HTMLTitleElement.o \ - DOM/ImageData.o \ - DOM/Node.o \ - DOM/ParentNode.o \ - DOM/Text.o \ - DOM/Window.o \ - DOM/XMLHttpRequest.o \ - StylePropertiesModel.o \ - DOMTreeModel.o \ - Dump.o \ - FontCache.o \ - Frame.o \ - HtmlView.o \ - Layout/BoxModelMetrics.o \ - Layout/LayoutBlock.o \ - Layout/LayoutBox.o \ - Layout/LayoutBreak.o \ - Layout/LayoutCanvas.o \ - Layout/LayoutDocument.o \ - Layout/LayoutImage.o \ - Layout/LayoutInline.o \ - Layout/LayoutListItem.o \ - Layout/LayoutListItemMarker.o \ - Layout/LayoutNode.o \ - Layout/LayoutReplaced.o \ - Layout/LayoutTable.o \ - Layout/LayoutTableCell.o \ - Layout/LayoutTableRow.o \ - Layout/LayoutText.o \ - Layout/LayoutTreeBuilder.o \ - Layout/LayoutWidget.o \ - Layout/LineBox.o \ - Layout/LineBoxFragment.o \ - Parser/CSSParser.o \ - Parser/HTMLParser.o \ - ResourceLoader.o \ - URLEncoder.o - -EXTRA_SOURCES = \ - CSS/DefaultStyleSheetSource.cpp \ - CSS/PropertyID.h \ - CSS/PropertyID.cpp - -GENERATE_CSS_PROPERTYID_CPP = CodeGenerators/Generate_CSS_PropertyID_cpp/Generate_CSS_PropertyID_cpp -GENERATE_CSS_PROPERTYID_H = CodeGenerators/Generate_CSS_PropertyID_h/Generate_CSS_PropertyID_h - -$(GENERATE_CSS_PROPERTYID_H): - @flock $(dir $(GENERATE_CSS_PROPERTYID_H)) $(MAKE) -C $(dir $(GENERATE_CSS_PROPERTYID_H)) - -$(GENERATE_CSS_PROPERTYID_CPP): - @flock $(dir $(GENERATE_CSS_PROPERTYID_CPP)) $(MAKE) -C $(dir $(GENERATE_CSS_PROPERTYID_CPP)) - -CSS/DefaultStyleSheetSource.cpp: CSS/Default.css Scripts/GenerateStyleSheetSource.sh - @echo "GENERATE $@" - $(QUIET) Scripts/GenerateStyleSheetSource.sh default_stylesheet_source $< > $@ - -CSS/PropertyID.h: CSS/Properties.json $(GENERATE_CSS_PROPERTYID_H) - @echo "GENERATE $@" - $(QUIET) flock CSS $(GENERATE_CSS_PROPERTYID_H) $< > $@ - -CSS/PropertyID.cpp: CSS/Properties.json $(GENERATE_CSS_PROPERTYID_CPP) - @echo "GENERATE $@" - $(QUIET) flock CSS $(GENERATE_CSS_PROPERTYID_CPP) $< > $@ - -ResourceLoader.cpp: ../../Services/ProtocolServer/ProtocolClientEndpoint.h ../../Services/ProtocolServer/ProtocolServerEndpoint.h -../../Services/ProtocolServer/ProtocolClientEndpoint.h ../../Services/ProtocolServer/ProtocolServerEndpoint.h: - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -EXTRA_CLEAN = CSS/DefaultStyleSheetSource.cpp CSS/PropertyID.h CSS/PropertyID.cpp - -OBJS = $(EXTRA_OBJS) $(LIBWEB_OBJS) - -LIBRARY = libweb.a - -install: - for dir in . Parser DOM CSS Layout; do \ - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibWeb/$$dir; \ - cp $$dir/*.h $(SERENITY_BASE_DIR)/Root/usr/include/LibWeb/$$dir/; \ - done - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common - -SUBDIRS = CodeGenerators - -include ../../Makefile.subdir diff --git a/Libraries/LibX86/CMakeLists.txt b/Libraries/LibX86/CMakeLists.txt new file mode 100644 index 0000000000..2f5dad9214 --- /dev/null +++ b/Libraries/LibX86/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + Instruction.cpp +) + +serenity_lib(LibX86 x86) +target_link_libraries(LibX86 LibC) diff --git a/Libraries/LibX86/Makefile b/Libraries/LibX86/Makefile deleted file mode 100644 index 0b06067f20..0000000000 --- a/Libraries/LibX86/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - Instruction.o - -LIBRARY = libx86.a - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LibX86/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LibX86/ - cp $(LIBRARY) $(SERENITY_BASE_DIR)/Root/usr/lib/ - -include ../../Makefile.common diff --git a/Libraries/Makefile b/Libraries/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/Libraries/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/Makefile b/Makefile deleted file mode 100644 index f8171d607a..0000000000 --- a/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -SUBDIRS += \ - Libraries \ - AK \ - DevTools \ - Services - -SUBDIRS += \ - Applications \ - Kernel \ - MenuApplets \ - Shell \ - Userland - -SUBDIRS += \ - Games \ - Demos - -ifneq (, $(shell which ccache)) - export PRE_CXX=ccache -endif - -include Makefile.subdir - -all: subdirs - -.PHONY: test -UNAME_S := $(shell uname -s) -ifeq ($(UNAME_S),Darwin) -test: -else -test: - $(QUIET) flock AK/Tests -c "$(MAKE) -C AK/Tests clean all && $(MAKE) -C AK/Tests clean" -endif - diff --git a/Makefile.common b/Makefile.common deleted file mode 100644 index 0f40094a1d..0000000000 --- a/Makefile.common +++ /dev/null @@ -1,158 +0,0 @@ -MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) -SERENITY_BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH))) - -CXX_STANDARD_FLAGS = -std=c++2a -CXX_WARNING_FLAGS = -Werror -Wextra -Wall -Wno-nonnull-compare -Wno-deprecated-copy -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-expansion-to-defined -CXX_FLAVOR_FLAGS = -fno-exceptions -fno-rtti -fstack-protector -#CXX_SUGGEST_FLAGS = -Wsuggest-final-types -Wsuggest-final-methods -Wsuggest-override #-Wsuggest-attribute=noreturn - -C_STANDARD_FLAGS = -C_WARNING_FLAGS = -Werror -Wextra -Wall -Wno-nonnull-compare -Wno-address-of-packed-member -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-expansion-to-defined -C_FLAVOR_FLAGS = -fstack-protector - -ARCH_FLAGS = -OPTIMIZATION_FLAGS = -Os - -INCLUDE_FLAGS += \ - -I. \ - -I$(SERENITY_BASE_DIR)/DevTools \ - -I$(SERENITY_BASE_DIR) \ - -I$(SERENITY_BASE_DIR)/Libraries \ - -I$(SERENITY_BASE_DIR)/Services - -VERBOSE = 0 - -UNAME_S := $(shell uname -s) - -ifneq ($(USE_HOST_CXX),) - ifeq ($(UNAME_S),OpenBSD) - HOST_CXX ?= clang++ - endif - - ifeq '' '$(findstring clang++,$(CXX))' - C_WARNING_FLAGS += -Wno-unknown-warning-option - CXX_WARNING_FLAGS += -Wno-unknown-warning-option - endif - ifeq ($(HOST_CXX),) - CXX = $(PRE_CXX) c++ - else - CXX = $(HOST_CXX) - endif - AS = as - LINK = ld - OBJ_SUFFIX ?= .host - ARCH = $(shell arch -s) -else - ifeq ($(UNAME_S),SerenityOS) - TOOLCHAIN_PREFIX = - else - TOOLCHAIN_PATH = $(SERENITY_BASE_DIR)/Toolchain/Local/bin - TOOLCHAIN_PREFIX = $(TOOLCHAIN_PATH)/i686-pc-serenity- - endif - - CXX = $(PRE_CXX) $(TOOLCHAIN_PREFIX)g++ - CC = $(PRE_CC) $(TOOLCHAIN_PREFIX)gcc - AS = $(TOOLCHAIN_PREFIX)as - LINK = $(TOOLCHAIN_PREFIX)ld - RANLIB = $(TOOLCHAIN_PREFIX)ranlib - AR = $(TOOLCHAIN_PREFIX)ar - ARCH = i386 - - DEFINES += -DDEBUG - - INCLUDE_FLAGS += \ - -I$(SERENITY_BASE_DIR)/Libraries/LibC \ - -I$(SERENITY_BASE_DIR)/Libraries/LibM \ - -I$(SERENITY_BASE_DIR)/Libraries/LibPthread - - ifdef KERNEL - DEFINES += -DKERNEL - else ifdef BOOTSTRAPPER - DEFINES += -DBOOTSTRAPPER - else - # everything else gets -lc -lm - LIB_DEPS := C M $(LIB_DEPS) - endif - - # turn "LIB_DEPS=C Core Thread" into "-lc -lcore -lthread -L.../LibC ..." - LDFLAGS += $(foreach lib,$(LIB_DEPS),\ - -l$(shell echo $(lib) | tr A-Z a-z)) - LDFLAGS += $(foreach lib,$(LIB_DEPS),\ - -L$(SERENITY_BASE_DIR)/Libraries/Lib$(lib)) - - STATIC_LIB_DEPS = $(foreach lib,$(LIB_DEPS),\ - $(SERENITY_BASE_DIR)/Libraries/Lib$(lib)/lib$(shell echo $(lib) | tr A-Z a-z).a) - - OBJ_SUFFIX ?= -endif - -#CXX = clang $(CLANG_FLAGS) -#CLANG_FLAGS = -Wconsumed -m32 -ffreestanding -march=i686 - -CXXFLAGS = -MMD -MP $(CXX_WARNING_FLAGS) $(OPTIMIZATION_FLAGS) $(CXX_FLAVOR_FLAGS) $(ARCH_FLAGS) $(CXX_STANDARD_FLAGS) $(CXX_SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) $(SUBPROJECT_CXXFLAGS) -CFLAGS = -MMD -MP $(C_FLAVOR_FLAGS) $(ARCH_FLAGS) $(C_STANDARD_FLAGS) $(C_SUGGEST_FLAGS) $(INCLUDE_FLAGS) $(DEFINES) $(SUBPROJECT_CXXFLAGS) - -DEFINES += -DSANITIZE_PTRS - -SUFFIXED_OBJS = $(patsubst %.o,%$(OBJ_SUFFIX).o,$(OBJS)) - -ifeq ($(VERBOSE),1) - QUIET = -else - QUIET = @ -endif - --include $(SUFFIXED_OBJS:%.o=%.d) - -.SUFFIXES: - -%$(OBJ_SUFFIX).o: %.cpp $(EXTRA_SOURCES) - @echo "$(notdir $(CURDIR)): C++ $@" - $(QUIET) $(CXX) $(CXXFLAGS) -o $@ -c $< - -%$(OBJ_SUFFIX).o: %.c - @echo "$(notdir $(CURDIR)): C $@" - $(QUIET) $(CC) $(CFLAGS) -o $@ -c $< - -%.ao: %.S - @echo "$(notdir $(CURDIR)): AS $@" - $(QUIET) $(AS) -o $@ $< - -$(PROGRAM): $(STATIC_LIB_DEPS) $(SUFFIXED_OBJS) $(EXTRA_OBJS) - @echo "$(notdir $(CURDIR)): LINK $(PROGRAM)" - $(QUIET) $(CXX) -o $(PROGRAM) $(EXTRA_OBJS) $(SUFFIXED_OBJS) $(LDFLAGS) - -$(LIBRARY): $(SUFFIXED_OBJS) $(EXTRA_OBJS) - @echo "$(notdir $(CURDIR)): LIB $@" - $(QUIET) $(AR) rcs $@ $(OBJS) $(EXTRA_OBJS) $(LIBS) - $(POST_LIBRARY_BUILD) - -#.PHONY: $(STATIC_LIB_DEPS) -$(STATIC_LIB_DEPS): - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -IPCCOMPILER = $(SERENITY_BASE_DIR)/DevTools/IPCCompiler/IPCCompiler -IPCCOMPILER: $(IPCCOMPILER) -$(IPCCOMPILER): - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -FORMCOMPILER = $(SERENITY_BASE_DIR)/DevTools/FormCompiler/FormCompiler -FORMCOMPILER: $(FORMCOMPILER) -$(FORMCOMPILER): - @flock $(dir $(@)) $(MAKE) -C $(dir $(@)) - -.DEFAULT_GOAL := all - -all: $(PROGRAM) $(LIBRARY) - -EXTRA_CLEAN ?= - -clean: - @echo "$(notdir $(CURDIR)): CLEAN" - $(QUIET) rm -f $(PROGRAM) $(LIBRARY) $(SUFFIXED_OBJS) $(EXTRA_OBJS) $(patsubst %.o,%.d,$(SUFFIXED_OBJS) $(EXTRA_OBJS)) $(EXTRA_CLEAN) - -install: - -.DELETE_ON_ERROR: - -.PHONY: all clean install diff --git a/Makefile.subdir b/Makefile.subdir deleted file mode 100644 index f7f0e0cd07..0000000000 --- a/Makefile.subdir +++ /dev/null @@ -1,17 +0,0 @@ -subdirs: $(SUBDIRS) -$(SUBDIRS): - @flock $@ $(MAKE) -C $@ - -all: $(subdirs) - -SUBDIRS_CLEAN = $(addsuffix .clean,$(SUBDIRS)) -clean: $(SUBDIRS_CLEAN) -$(SUBDIRS_CLEAN): %.clean: - @flock $* $(MAKE) -C $* clean - -SUBDIRS_INSTALL = $(addsuffix .install,$(SUBDIRS)) -install: $(SUBDIRS_INSTALL) -$(SUBDIRS_INSTALL): %.install: - @flock $* $(MAKE) -C $* install - -.PHONY: all clean install $(SUBDIRS) diff --git a/MenuApplets/Audio/CMakeLists.txt b/MenuApplets/Audio/CMakeLists.txt new file mode 100644 index 0000000000..06741efe28 --- /dev/null +++ b/MenuApplets/Audio/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(Audio.MenuApplet) +target_link_libraries(Audio.MenuApplet LibGUI LibGfx LibAudio) diff --git a/MenuApplets/Audio/Makefile b/MenuApplets/Audio/Makefile deleted file mode 100644 index 1033e9f303..0000000000 --- a/MenuApplets/Audio/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS = main.o - -PROGRAM = Audio.MenuApplet - -LIB_DEPS = Audio GUI IPC Gfx Thread Pthread Core - -include ../../Makefile.common diff --git a/MenuApplets/CMakeLists.txt b/MenuApplets/CMakeLists.txt new file mode 100644 index 0000000000..f8b9195468 --- /dev/null +++ b/MenuApplets/CMakeLists.txt @@ -0,0 +1,4 @@ +add_subdirectory(Audio) +add_subdirectory(Clock) +add_subdirectory(ResourceGraph) +add_subdirectory(UserName) diff --git a/MenuApplets/Clock/CMakeLists.txt b/MenuApplets/Clock/CMakeLists.txt new file mode 100644 index 0000000000..ee75b7f455 --- /dev/null +++ b/MenuApplets/Clock/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(Clock.MenuApplet) +target_link_libraries(Clock.MenuApplet LibGUI LibCore LibGfx) diff --git a/MenuApplets/Clock/Makefile b/MenuApplets/Clock/Makefile deleted file mode 100644 index 622012ba2a..0000000000 --- a/MenuApplets/Clock/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS = main.o - -PROGRAM = Clock.MenuApplet - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common
\ No newline at end of file diff --git a/MenuApplets/Makefile b/MenuApplets/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/MenuApplets/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/MenuApplets/ResourceGraph/CMakeLists.txt b/MenuApplets/ResourceGraph/CMakeLists.txt new file mode 100644 index 0000000000..eea7190853 --- /dev/null +++ b/MenuApplets/ResourceGraph/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(ResourceGraph.MenuApplet) +target_link_libraries(ResourceGraph.MenuApplet LibGUI LibCore LibGfx) diff --git a/MenuApplets/ResourceGraph/Makefile b/MenuApplets/ResourceGraph/Makefile deleted file mode 100644 index 8dab3d142c..0000000000 --- a/MenuApplets/ResourceGraph/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS = main.o - -PROGRAM = ResourceGraph.MenuApplet - -LIB_DEPS = GUI IPC Gfx Thread Pthread Core - -include ../../Makefile.common diff --git a/MenuApplets/UserName/CMakeLists.txt b/MenuApplets/UserName/CMakeLists.txt new file mode 100644 index 0000000000..1c4f1ee11a --- /dev/null +++ b/MenuApplets/UserName/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(UserName.MenuApplet) +target_link_libraries(UserName.MenuApplet LibGUI LibGfx) diff --git a/MenuApplets/UserName/Makefile b/MenuApplets/UserName/Makefile deleted file mode 100644 index 13713befee..0000000000 --- a/MenuApplets/UserName/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -OBJS = main.o - -PROGRAM = UserName.MenuApplet - -LIB_DEPS = GUI IPC Gfx Core - -include ../../Makefile.common diff --git a/Meta/Lagom/CMakeLists.txt b/Meta/Lagom/CMakeLists.txt index 492c934455..08fdecf34b 100644 --- a/Meta/Lagom/CMakeLists.txt +++ b/Meta/Lagom/CMakeLists.txt @@ -46,28 +46,35 @@ file(GLOB LIBX86_SOURCES "../../Libraries/LibX86/*.cpp") file(GLOB LIBJS_SOURCES "../../Libraries/LibJS/*.cpp") file(GLOB LIBJS_SUBDIR_SOURCES "../../Libraries/LibJS/*/*.cpp") -set(SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES} ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBX86_SOURCES}) +set(LAGOM_CORE_SOURCES ${AK_SOURCES} ${LIBCORE_SOURCES}) +set(LAGOM_MORE_SOURCES ${LIBIPC_SOURCES} ${LIBLINE_SOURCES} ${LIBJS_SOURCES} ${LIBJS_SUBDIR_SOURCES} ${LIBX86_SOURCES}) include_directories (../../) include_directories (../../Libraries/) -add_library(lagom ${SOURCES}) +add_library(LagomCore ${LAGOM_CORE_SOURCES}) -add_executable(TestApp TestApp.cpp) -target_link_libraries(TestApp lagom) -target_link_libraries(TestApp stdc++) +if (BUILD_LAGOM) + add_library(Lagom $<TARGET_OBJECTS:LagomCore> ${LAGOM_MORE_SOURCES}) -add_executable(TestJson TestJson.cpp) -target_link_libraries(TestJson lagom) -target_link_libraries(TestJson stdc++) + add_executable(TestApp TestApp.cpp) + target_link_libraries(TestApp Lagom) + target_link_libraries(TestApp stdc++) -add_executable(js ../../Userland/js.cpp) -target_link_libraries(js lagom) -target_link_libraries(js stdc++) -target_link_libraries(js pthread) + add_executable(TestJson TestJson.cpp) + target_link_libraries(TestJson Lagom) + target_link_libraries(TestJson stdc++) -add_executable(disasm ../../Userland/disasm.cpp) -target_link_libraries(disasm lagom) -target_link_libraries(disasm stdc++) + add_executable(js_lagom ../../Userland/js.cpp) + set_target_properties(js_lagom PROPERTIES OUTPUT_NAME js) + target_link_libraries(js_lagom Lagom) + target_link_libraries(js_lagom stdc++) + target_link_libraries(js_lagom pthread) + + add_executable(disasm_lagom ../../Userland/disasm.cpp) + set_target_properties(disasm_lagom PROPERTIES OUTPUT_NAME disasm) + target_link_libraries(disasm_lagom Lagom) + target_link_libraries(disasm_lagom stdc++) +endif() if (ENABLE_FUZZER_SANITIZER) add_subdirectory(Fuzzers) diff --git a/Meta/Lagom/build-js.sh b/Meta/Lagom/build-js.sh deleted file mode 100755 index 10827428f3..0000000000 --- a/Meta/Lagom/build-js.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -cd "$script_path" || exit 1 -mkdir -p build -cd build || exit 1 -cmake .. -make js diff --git a/Kernel/build-image-grub.sh b/Meta/build-image-grub.sh index 7f10b3100e..7efbb0649f 100755 --- a/Kernel/build-image-grub.sh +++ b/Meta/build-image-grub.sh @@ -37,7 +37,7 @@ cleanup() { if [ -d mnt ]; then printf "unmounting filesystem... " umount mnt || ( sleep 1 && sync && umount mnt ) - rm -rf mnt + rmdir mnt echo "done" fi @@ -83,11 +83,8 @@ mkdir -p mnt mount "${dev}${partition_number}" mnt/ || die "couldn't mount filesystem" echo "done" -./build-root-filesystem.sh - -printf "creating /boot... " -mkdir -p mnt/boot -echo "done" +script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +"$script_path/build-root-filesystem.sh" echo "installing grub using $grub..." $grub --boot-directory=mnt/boot --target=i386-pc --modules="ext2 part_msdos" "${dev}" @@ -98,7 +95,3 @@ else cp grub-"${partition_scheme}".cfg mnt/boot/grub/grub.cfg fi echo "done" - -printf "installing kernel in /boot... " -cp kernel mnt/boot -echo "done" diff --git a/Kernel/build-image-qemu.sh b/Meta/build-image-qemu.sh index 50dc4e32ad..10ff5384f9 100755 --- a/Kernel/build-image-qemu.sh +++ b/Meta/build-image-qemu.sh @@ -63,7 +63,7 @@ cleanup() { printf "unmounting filesystem... " umount mnt || ( sleep 1 && sync && umount mnt ) fi - rm -rf mnt + rmdir mnt if [ "$(uname -s)" = "OpenBSD" ]; then vnconfig -u "$VND" elif [ "$(uname -s)" = "FreeBSD" ]; then @@ -74,7 +74,8 @@ cleanup() { } trap cleanup EXIT -./build-root-filesystem.sh +script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) +"$script_path/build-root-filesystem.sh" if [ $use_genext2fs = 1 ]; then # regenerate new image, since genext2fs is unable to reuse the previously written image. diff --git a/Meta/build-root-filesystem.sh b/Meta/build-root-filesystem.sh new file mode 100755 index 0000000000..47bd8ed231 --- /dev/null +++ b/Meta/build-root-filesystem.sh @@ -0,0 +1,157 @@ +#!/bin/sh + +set -e + +wheel_gid=1 +tty_gid=2 +phys_gid=3 +audio_gid=4 +window_uid=13 +window_gid=13 + +die() { + echo "die: $*" + exit 1 +} + +if [ "$(id -u)" != 0 ]; then + die "this script needs to run as root" +fi + +[ -z "$SERENITY_ROOT" ] && die "SERENITY_ROOT is not set" +[ -d "$SERENITY_ROOT/Base" ] || die "$SERENITY_ROOT/Base doesn't exist" + +umask 0022 + +printf "creating initial filesystem structure... " +for dir in bin etc proc mnt tmp boot mod; do + mkdir -p mnt/$dir +done +chmod 700 mnt/boot +chmod 700 mnt/mod +chmod 1777 mnt/tmp +echo "done" + +printf "setting up device nodes... " +mkdir -p mnt/dev +mkdir -p mnt/dev/pts +mknod mnt/dev/fb0 b 29 0 +chmod 660 mnt/dev/fb0 +chown 0:$phys_gid mnt/dev/fb0 +mknod mnt/dev/tty0 c 4 0 +mknod mnt/dev/tty1 c 4 1 +mknod mnt/dev/tty2 c 4 2 +mknod mnt/dev/tty3 c 4 3 +mknod mnt/dev/ttyS0 c 4 64 +mknod mnt/dev/ttyS1 c 4 65 +mknod mnt/dev/ttyS2 c 4 66 +mknod mnt/dev/ttyS3 c 4 67 +for tty in 0 1 2 3 S0 S1 S2 S3; do + chmod 620 mnt/dev/tty$tty + chown 0:$tty_gid mnt/dev/tty$tty +done +mknod mnt/dev/random c 1 8 +mknod mnt/dev/null c 1 3 +mknod mnt/dev/zero c 1 5 +mknod mnt/dev/full c 1 7 +# random, is failing (randomly) on fuse-ext2 on macos :) +chmod 666 mnt/dev/random || true +chmod 666 mnt/dev/null +chmod 666 mnt/dev/zero +chmod 666 mnt/dev/full +mknod mnt/dev/keyboard c 85 1 +chmod 440 mnt/dev/keyboard +chown 0:$phys_gid mnt/dev/keyboard +mknod mnt/dev/mouse c 10 1 +chmod 440 mnt/dev/mouse +chown 0:$phys_gid mnt/dev/mouse +mknod mnt/dev/audio c 42 42 +chmod 220 mnt/dev/audio +chown 0:$audio_gid mnt/dev/audio +mknod mnt/dev/ptmx c 5 2 +chmod 666 mnt/dev/ptmx +mknod mnt/dev/hda b 3 0 +mknod mnt/dev/hdb b 3 1 +mknod mnt/dev/hdc b 4 0 +mknod mnt/dev/hdd b 4 1 +for hd in a b c d; do + chmod 600 mnt/dev/hd$hd +done + +ln -s /proc/self/fd/0 mnt/dev/stdin +ln -s /proc/self/fd/1 mnt/dev/stdout +ln -s /proc/self/fd/2 mnt/dev/stderr +echo "done" + +printf "installing base system... " +cp -R "$SERENITY_ROOT"/Base/* mnt/ +cp -R Root/* mnt/ +chmod 400 mnt/res/kernel.map + +chmod 660 mnt/etc/WindowServer/WindowServer.ini +chown $window_uid:$window_gid mnt/etc/WindowServer/WindowServer.ini +echo "/bin/sh" > mnt/etc/shells + +chown 0:$wheel_gid mnt/bin/su +chown 0:$phys_gid mnt/bin/shutdown +chown 0:$phys_gid mnt/bin/reboot +chown 0:0 mnt/boot/Kernel +chown 0:0 mnt/res/kernel.map +chmod 0400 mnt/res/kernel.map +chmod 0400 mnt/boot/Kernel +chmod 4750 mnt/bin/su +chmod 4755 mnt/bin/ping +chmod 4750 mnt/bin/reboot +chmod 4750 mnt/bin/shutdown + +echo "done" + +printf "installing users... " +mkdir -p mnt/root +mkdir -p mnt/home/anon +mkdir -p mnt/home/anon/Desktop +mkdir -p mnt/home/anon/Downloads +mkdir -p mnt/home/nona +cp "$SERENITY_ROOT"/ReadMe.md mnt/home/anon/ +cp -r "$SERENITY_ROOT"/Libraries/LibJS/Tests mnt/home/anon/js-tests +chmod 700 mnt/root +chmod 700 mnt/home/anon +chmod 700 mnt/home/nona +chown -R 0:0 mnt/root +chown -R 100:100 mnt/home/anon +chown -R 200:200 mnt/home/nona +echo "done" + +printf "installing shortcuts... " +ln -s FileManager mnt/bin/fm +ln -s HelloWorld mnt/bin/hw +ln -s IRCClient mnt/bin/irc +ln -s Minesweeper mnt/bin/ms +ln -s Shell mnt/bin/sh +ln -s Snake mnt/bin/sn +ln -s Taskbar mnt/bin/tb +ln -s VisualBuilder mnt/bin/vb +ln -s WidgetGallery mnt/bin/wg +ln -s TextEditor mnt/bin/te +ln -s HexEditor mnt/bin/he +ln -s PaintBrush mnt/bin/pb +ln -s QuickShow mnt/bin/qs +ln -s Piano mnt/bin/pi +ln -s SystemDialog mnt/bin/sd +ln -s Calculator mnt/bin/calc +ln -s Calendar mnt/bin/calendar +ln -s Inspector mnt/bin/ins +ln -s SoundPlayer mnt/bin/sp +ln -s Help mnt/bin/help +ln -s Browser mnt/bin/br +ln -s HackStudio mnt/bin/hs +ln -s SystemMonitor mnt/bin/sm +ln -s ProfileViewer mnt/bin/pv +ln -s WebServer mnt/bin/ws +ln -s Solitaire mnt/bin/sl +echo "done" + +# Run local sync script, if it exists +if [ -f sync-local.sh ]; then + sh sync-local.sh +fi diff --git a/Kernel/debug-kernel b/Meta/debug-kernel.sh index c7cd462759..c7cd462759 100755 --- a/Kernel/debug-kernel +++ b/Meta/debug-kernel.sh diff --git a/Kernel/grub-ebr.cfg b/Meta/grub-ebr.cfg index 99300a0be4..99300a0be4 100644 --- a/Kernel/grub-ebr.cfg +++ b/Meta/grub-ebr.cfg diff --git a/Kernel/grub-gpt.cfg b/Meta/grub-gpt.cfg index a2c13c1be5..a2c13c1be5 100644 --- a/Kernel/grub-gpt.cfg +++ b/Meta/grub-gpt.cfg diff --git a/Kernel/grub-mbr.cfg b/Meta/grub-mbr.cfg index 8e98c5cd70..8e98c5cd70 100644 --- a/Kernel/grub-mbr.cfg +++ b/Meta/grub-mbr.cfg diff --git a/Kernel/run b/Meta/run.sh index 445f4c89c4..31481a7e5e 100755 --- a/Kernel/run +++ b/Meta/run.sh @@ -3,9 +3,6 @@ set -e -script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -cd "$script_path" - #SERENITY_PACKET_LOGGING_ARG="-object filter-dump,id=hue,netdev=breh,file=e1000.pcap" [ -e /dev/kvm ] && [ -r /dev/kvm ] && [ -w /dev/kvm ] && SERENITY_KVM_ARG="-enable-kvm" @@ -58,7 +55,7 @@ elif [ "$1" = "qn" ]; then $SERENITY_QEMU_BIN \ $SERENITY_COMMON_QEMU_ARGS \ -device e1000 \ - -kernel kernel \ + -kernel Kernel/Kernel \ -append "${SERENITY_KERNEL_CMDLINE}" elif [ "$1" = "qtap" ]; then # ./run qtap: qemu with tap @@ -68,7 +65,7 @@ elif [ "$1" = "qtap" ]; then $SERENITY_PACKET_LOGGING_ARG \ -netdev tap,ifname=tap0,id=br0 \ -device e1000,netdev=br0 \ - -kernel kernel \ + -kernel Kernel/Kernel \ -append "${SERENITY_KERNEL_CMDLINE}" elif [ "$1" = "qgrub" ]; then # ./run qgrub: qemu with grub @@ -92,7 +89,7 @@ elif [ "$1" = "q35_cmd" ]; then $SERENITY_KVM_ARG \ -netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-10.0.2.15:8888,hostfwd=tcp:127.0.0.1:8823-10.0.2.15:23 \ -device e1000,netdev=breh \ - -kernel kernel \ + -kernel Kernel/Kernel \ -append "${SERENITY_KERNEL_CMDLINE}" elif [ "$1" = "qcmd" ]; then SERENITY_KERNEL_CMDLINE="" @@ -108,7 +105,7 @@ elif [ "$1" = "qcmd" ]; then $SERENITY_KVM_ARG \ -netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-10.0.2.15:8888,hostfwd=tcp:127.0.0.1:8823-10.0.2.15:23 \ -device e1000,netdev=breh \ - -kernel kernel \ + -kernel Kernel/Kernel \ -append "${SERENITY_KERNEL_CMDLINE}" else # ./run: qemu with user networking @@ -118,6 +115,6 @@ else $SERENITY_PACKET_LOGGING_ARG \ -netdev user,id=breh,hostfwd=tcp:127.0.0.1:8888-10.0.2.15:8888,hostfwd=tcp:127.0.0.1:8823-10.0.2.15:23,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000,hostfwd=tcp:127.0.0.1:2222-10.0.2.15:22 \ -device e1000,netdev=breh \ - -kernel kernel \ + -kernel Kernel/Kernel \ -append "${SERENITY_KERNEL_CMDLINE}" fi diff --git a/Kernel/sync.sh b/Meta/sync.sh index 6dcab996f1..bc6f26b205 100755 --- a/Kernel/sync.sh +++ b/Meta/sync.sh @@ -2,6 +2,5 @@ set -e script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) -cd "$script_path" -sudo -E PATH="$PATH" ./build-image-qemu.sh +sudo -E PATH="$PATH" "$script_path/build-image-qemu.sh" diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index a7af9aaa01..493d6c9840 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -154,7 +154,7 @@ func_defined build || build() { run make $makeopts } func_defined install || install() { - run make DESTDIR="$SERENITY_ROOT"/Root $installopts install + run make DESTDIR="$SERENITY_ROOT"/Build/Root $installopts install } func_defined post_install || post_install() { echo @@ -216,10 +216,10 @@ uninstall() { for f in `cat plist`; do case $f in */) - run rmdir "$SERENITY_ROOT/Root/$f" || true + run rmdir "$SERENITY_ROOT/Build/Root/$f" || true ;; *) - run rm -rf "$SERENITY_ROOT/Root/$f" + run rm -rf "$SERENITY_ROOT/Build/Root/$f" ;; esac done diff --git a/Ports/bash/package.sh b/Ports/bash/package.sh index a25d74c5ad..1870aec275 100755 --- a/Ports/bash/package.sh +++ b/Ports/bash/package.sh @@ -16,6 +16,6 @@ build() { } post_install() { - mkdir -p $SERENITY_ROOT/Root/bin - ln -s /usr/local/bin/bash $SERENITY_ROOT/Root/bin/bash + mkdir -p $SERENITY_ROOT/Build/Root/bin + ln -s /usr/local/bin/bash $SERENITY_ROOT/Build/Root/bin/bash } diff --git a/Ports/binutils/package.sh b/Ports/binutils/package.sh index c2a8a641da..39dda685e5 100755 --- a/Ports/binutils/package.sh +++ b/Ports/binutils/package.sh @@ -2,7 +2,7 @@ port=binutils version=2.32 useconfigure=true -configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=$SERENITY_ROOT/Root --disable-werror --disable-gdb --disable-nls" +configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=$SERENITY_ROOT/Build/Root --disable-werror --disable-gdb --disable-nls" files="https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz https://ftp.gnu.org/gnu/binutils/binutils-${version}.tar.xz.sig binutils-${version}.tar.xz.sig https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg" diff --git a/Ports/c-ray/package.sh b/Ports/c-ray/package.sh index 05aa71f6ce..a1db8e6cdc 100755 --- a/Ports/c-ray/package.sh +++ b/Ports/c-ray/package.sh @@ -12,6 +12,6 @@ configure() { } install() { - mkdir -p $SERENITY_ROOT/Root/home/anon/c-ray - cp -r c-ray-master/* $SERENITY_ROOT/Root/home/anon/c-ray + mkdir -p $SERENITY_ROOT/Build/Root/home/anon/c-ray + cp -r c-ray-master/* $SERENITY_ROOT/Build/Root/home/anon/c-ray } diff --git a/Ports/frotz/package.sh b/Ports/frotz/package.sh index e4010f79c0..16b55b737c 100755 --- a/Ports/frotz/package.sh +++ b/Ports/frotz/package.sh @@ -10,7 +10,7 @@ build() { AR=i686-pc-serenity-ar \ RANLIB=i686-pc-serenity-ranlib \ PKG_CONFIG_CURSES=no \ - CURSES_CFLAGS="-I${SERENITY_ROOT}/Root/usr/local/include/ncurses" \ + CURSES_CFLAGS="-I${SERENITY_ROOT}/Build/Root/usr/local/include/ncurses" \ CURSES_LDFLAGS="-lncurses -ltinfo" \ CURSES=ncurses \ USE_UTF8=no \ diff --git a/Ports/gcc/package.sh b/Ports/gcc/package.sh index d18fe51d10..017ad92157 100755 --- a/Ports/gcc/package.sh +++ b/Ports/gcc/package.sh @@ -2,12 +2,12 @@ port=gcc version=9.3.0 useconfigure=true -configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=$SERENITY_ROOT/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls" +configopts="--target=i686-pc-serenity --with-sysroot=/ --with-build-sysroot=$SERENITY_ROOT/Build/Root --with-newlib --enable-languages=c,c++ --disable-lto --disable-nls" files="https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz gcc-${version}.tar.xz https://ftp.gnu.org/gnu/gcc/gcc-${version}/gcc-${version}.tar.xz.sig gcc-${version}.tar.xz.sig https://ftp.gnu.org/gnu/gnu-keyring.gpg gnu-keyring.gpg" makeopts="all-gcc all-target-libgcc all-target-libstdc++-v3 -j $(nproc)" -installopts="DESTDIR=$SERENITY_ROOT/Root install-gcc install-target-libgcc install-target-libstdc++-v3" +installopts="DESTDIR=$SERENITY_ROOT/Build/Root install-gcc install-target-libgcc install-target-libstdc++-v3" depends="binutils" auth_type="sig" auth_opts="--keyring ./gnu-keyring.gpg gcc-${version}.tar.xz.sig" diff --git a/Ports/gnuplot/package.sh b/Ports/gnuplot/package.sh index ed462a3346..706498a40c 100755 --- a/Ports/gnuplot/package.sh +++ b/Ports/gnuplot/package.sh @@ -4,7 +4,7 @@ version=5.2.8 useconfigure=true # Note: gnuplot's source code is hosted on SourceForge, but using the GitHub mirror makes downloading a versioned .tar.gz easier. files="https://github.com/gnuplot/gnuplot/archive/${version}.tar.gz gnuplot-${version}.tar.gz" -configopts="--prefix=$SERENITY_ROOT/Root/usr/local --with-readline=builtin" +configopts="--prefix=$SERENITY_ROOT/Build/Root/usr/local --with-readline=builtin" pre_configure() { run ./prepare diff --git a/Ports/lua/package.sh b/Ports/lua/package.sh index 54fbf57a3a..8892ce03b3 100755 --- a/Ports/lua/package.sh +++ b/Ports/lua/package.sh @@ -3,4 +3,4 @@ port=lua version=5.3.5 files="http://www.lua.org/ftp/lua-5.3.5.tar.gz lua-5.3.5.tar.gz 4f4b4f323fd3514a68e0ab3da8ce3455" makeopts="-j$(nproc) generic" -installopts="INSTALL_TOP=$SERENITY_ROOT/Root/" +installopts="INSTALL_TOP=$SERENITY_ROOT/Build/Root/" diff --git a/Ports/nano/package.sh b/Ports/nano/package.sh index 9584953e8e..fda7b0ed09 100755 --- a/Ports/nano/package.sh +++ b/Ports/nano/package.sh @@ -10,5 +10,5 @@ auth_type="sig" auth_import_key="BFD009061E535052AD0DF2150D28D4D2A0ACE884" auth_opts="nano-${version}.tar.xz.asc nano-${version}.tar.xz" -export CPPFLAGS=-I${SERENITY_ROOT}/Root/usr/local/include/ncurses -export PKG_CONFIG_PATH=${SERENITY_ROOT}/Root/usr/local/lib/pkgconfig +export CPPFLAGS=-I${SERENITY_ROOT}/Build/Root/usr/local/include/ncurses +export PKG_CONFIG_PATH=${SERENITY_ROOT}/Build/Root/usr/local/lib/pkgconfig diff --git a/Ports/openssl/package.sh b/Ports/openssl/package.sh index 9963eedbe6..634af782f9 100755 --- a/Ports/openssl/package.sh +++ b/Ports/openssl/package.sh @@ -11,7 +11,7 @@ auth_import_key="8657ABB260F056B1E5190839D9C4D26D0E604491" auth_opts="openssl-${version}.tar.gz.asc openssl-${version}.tar.gz" depends="zlib" -usr_local=$SERENITY_ROOT/Root/usr/local/ +usr_local=$SERENITY_ROOT/Build/Root/usr/local/ configopts="--prefix=$usr_local -DOPENSSL_SYS_SERENITY=1 --openssldir=$usr_local/ssl BSD-x86 zlib no-tests no-threads no-asm" configure() { diff --git a/Ports/quake/package.sh b/Ports/quake/package.sh index e0774d4286..cab4ff4aae 100755 --- a/Ports/quake/package.sh +++ b/Ports/quake/package.sh @@ -7,4 +7,4 @@ files="https://github.com/SerenityOS/SerenityQuake/archive/master.tar.gz quake.t makeopts="V=1 SYMBOLS_ON=Y " depends=SDL2 -export PATH=${SERENITY_ROOT}/Root/usr/bin:$PATH
\ No newline at end of file +export PATH=${SERENITY_ROOT}/Build/Root/usr/bin:$PATH diff --git a/Ports/sl/package.sh b/Ports/sl/package.sh index 279ad4c65e..6aae887352 100755 --- a/Ports/sl/package.sh +++ b/Ports/sl/package.sh @@ -6,11 +6,11 @@ files="https://github.com/mtoyoda/sl/archive/master.tar.gz sl-git.tar.gz" depends="ncurses" build() { - run ${CC} -I${SERENITY_ROOT}/Root/usr/local/include/ncurses -L${SERENITY_ROOT}/Root/usr/local/lib -o sl sl.c -lncurses -ltinfo + run ${CC} -I${SERENITY_ROOT}/Build/Root/usr/local/include/ncurses -L${SERENITY_ROOT}/Build/Root/usr/local/lib -o sl sl.c -lncurses -ltinfo } post_install() { # Dirty hack that seems to be necessary to make ncurses play nice - mkdir -p ${SERENITY_ROOT}/Root/usr/local/share/terminfo/x - cp ${SERENITY_ROOT}/Root/usr/local/share/terminfo/78/xterm ${SERENITY_ROOT}/Root/usr/local/share/terminfo/x/ + mkdir -p ${SERENITY_ROOT}/Build/Root/usr/local/share/terminfo/x + cp ${SERENITY_ROOT}/Build/Root/usr/local/share/terminfo/78/xterm ${SERENITY_ROOT}/Build/Root/usr/local/share/terminfo/x/ } diff --git a/Ports/termcap/package.sh b/Ports/termcap/package.sh index fe27a3d80e..be5657b288 100755 --- a/Ports/termcap/package.sh +++ b/Ports/termcap/package.sh @@ -2,5 +2,5 @@ port=termcap version=1.3.1 useconfigure=true -configopts="--prefix=$SERENITY_ROOT/Root/usr" +configopts="--prefix=$SERENITY_ROOT/Build/Root/usr" files="https://ftp.gnu.org/gnu/termcap/termcap-${version}.tar.gz termcap-${version}.tar.gz" diff --git a/Services/AudioServer/ASClientConnection.cpp b/Services/AudioServer/ASClientConnection.cpp index a1d4b766a0..c941ffcf2a 100644 --- a/Services/AudioServer/ASClientConnection.cpp +++ b/Services/AudioServer/ASClientConnection.cpp @@ -26,8 +26,8 @@ #include "ASClientConnection.h" #include "ASMixer.h" -#include "AudioClientEndpoint.h" #include <AK/SharedBuffer.h> +#include <AudioServer/AudioClientEndpoint.h> #include <LibAudio/Buffer.h> #include <LibCore/EventLoop.h> #include <errno.h> diff --git a/Services/AudioServer/CMakeLists.txt b/Services/AudioServer/CMakeLists.txt new file mode 100644 index 0000000000..4ae91fb090 --- /dev/null +++ b/Services/AudioServer/CMakeLists.txt @@ -0,0 +1,13 @@ +compile_ipc(AudioServer.ipc AudioServerEndpoint.h) +compile_ipc(AudioClient.ipc AudioClientEndpoint.h) + +set(SOURCES + ASClientConnection.cpp + ASMixer.cpp + main.cpp + AudioServerEndpoint.h + AudioClientEndpoint.h +) + +serenity_bin(AudioServer) +target_link_libraries(AudioServer LibCore LibThread LibIPC) diff --git a/Services/AudioServer/Makefile b/Services/AudioServer/Makefile deleted file mode 100644 index 7b6b3dd031..0000000000 --- a/Services/AudioServer/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -OBJS = \ - main.o \ - ASMixer.o \ - ASClientConnection.o - -PROGRAM = AudioServer - -LIB_DEPS = Core IPC Thread Pthread - -EXTRA_CLEAN = AudioServerEndpoint.h AudioClientEndpoint.h - -*.cpp: AudioServerEndpoint.h AudioClientEndpoint.h - -AudioServerEndpoint.h: AudioServer.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -AudioClientEndpoint.h: AudioClient.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/AudioServer/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/AudioServer/ - -include ../../Makefile.common diff --git a/Services/CMakeLists.txt b/Services/CMakeLists.txt new file mode 100644 index 0000000000..cf18e97b48 --- /dev/null +++ b/Services/CMakeLists.txt @@ -0,0 +1,13 @@ +add_subdirectory(AudioServer) +add_subdirectory(DHCPClient) +add_subdirectory(LaunchServer) +add_subdirectory(LookupServer) +add_subdirectory(NotificationServer) +add_subdirectory(ProtocolServer) +add_subdirectory(SystemMenu) +add_subdirectory(SystemServer) +add_subdirectory(Taskbar) +add_subdirectory(TelnetServer) +add_subdirectory(TTYServer) +add_subdirectory(WebServer) +add_subdirectory(WindowServer) diff --git a/Services/DHCPClient/CMakeLists.txt b/Services/DHCPClient/CMakeLists.txt new file mode 100644 index 0000000000..6fddd4a21f --- /dev/null +++ b/Services/DHCPClient/CMakeLists.txt @@ -0,0 +1,8 @@ +set(SOURCES + DHCPv4Client.cpp + DHCPv4.cpp + main.cpp +) + +serenity_bin(DHCPClient) +target_link_libraries(DHCPClient LibCore) diff --git a/Services/DHCPClient/Makefile b/Services/DHCPClient/Makefile deleted file mode 100644 index ce7c27b86d..0000000000 --- a/Services/DHCPClient/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJS = \ - DHCPv4.o \ - DHCPv4Client.o \ - main.o - -PROGRAM = DHCPClient - -LIB_DEPS = Core - -include ../../Makefile.common diff --git a/Services/LaunchServer/CMakeLists.txt b/Services/LaunchServer/CMakeLists.txt new file mode 100644 index 0000000000..b51a413b12 --- /dev/null +++ b/Services/LaunchServer/CMakeLists.txt @@ -0,0 +1,13 @@ +compile_ipc(LaunchServer.ipc LaunchServerEndpoint.h) +compile_ipc(LaunchClient.ipc LaunchClientEndpoint.h) + +set(SOURCES + ClientConnection.cpp + Launcher.cpp + main.cpp + LaunchClientEndpoint.h + LaunchServerEndpoint.h +) + +serenity_bin(LaunchServer) +target_link_libraries(LaunchServer LibCore LibIPC) diff --git a/Services/LaunchServer/ClientConnection.cpp b/Services/LaunchServer/ClientConnection.cpp index 60c89ed956..35bc944b09 100644 --- a/Services/LaunchServer/ClientConnection.cpp +++ b/Services/LaunchServer/ClientConnection.cpp @@ -25,10 +25,10 @@ */ #include "ClientConnection.h" -#include "LaunchClientEndpoint.h" #include "Launcher.h" #include <AK/HashMap.h> #include <AK/URL.h> +#include <LaunchServer/LaunchClientEndpoint.h> namespace LaunchServer { diff --git a/Services/LaunchServer/Makefile b/Services/LaunchServer/Makefile deleted file mode 100644 index ef1eddce7d..0000000000 --- a/Services/LaunchServer/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -OBJS = \ - main.o \ - ClientConnection.o \ - Launcher.o - -PROGRAM = LaunchServer - -LIB_DEPS = Core IPC - -EXTRA_CLEAN = LaunchServerEndpoint.h LaunchClientEndpoint.h - -*.cpp: LaunchServerEndpoint.h LaunchClientEndpoint.h - -LaunchServerEndpoint.h: LaunchServer.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -LaunchClientEndpoint.h: LaunchClient.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/LaunchServer/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/LaunchServer/ - -include ../../Makefile.common diff --git a/Services/LaunchServer/main.cpp b/Services/LaunchServer/main.cpp index af9234b3a1..61b2533d69 100644 --- a/Services/LaunchServer/main.cpp +++ b/Services/LaunchServer/main.cpp @@ -29,7 +29,6 @@ #include <LibCore/ConfigFile.h> #include <LibCore/EventLoop.h> #include <LibCore/LocalServer.h> -#include <LibGUI/WindowServerConnection.h> #include <stdio.h> #include <unistd.h> diff --git a/Services/LookupServer/CMakeLists.txt b/Services/LookupServer/CMakeLists.txt new file mode 100644 index 0000000000..89769d4abc --- /dev/null +++ b/Services/LookupServer/CMakeLists.txt @@ -0,0 +1,10 @@ +set(SOURCES + DNSAnswer.cpp + DNSRequest.cpp + DNSResponse.cpp + LookupServer.cpp + main.cpp +) + +serenity_bin(LookupServer) +target_link_libraries(LookupServer LibCore) diff --git a/Services/LookupServer/Makefile b/Services/LookupServer/Makefile deleted file mode 100644 index 42a4e1930b..0000000000 --- a/Services/LookupServer/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -OBJS = \ - LookupServer.o \ - DNSRequest.o \ - DNSResponse.o \ - DNSAnswer.o \ - main.o - -PROGRAM = LookupServer - -LIB_DEPS = Core - -include ../../Makefile.common diff --git a/Services/Makefile b/Services/Makefile deleted file mode 100644 index 0025ae2061..0000000000 --- a/Services/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -SUBDIRS := $(patsubst %/Makefile,%/,$(wildcard */Makefile)) - -include ../Makefile.subdir diff --git a/Services/NotificationServer/CMakeLists.txt b/Services/NotificationServer/CMakeLists.txt new file mode 100644 index 0000000000..a28d9f16a5 --- /dev/null +++ b/Services/NotificationServer/CMakeLists.txt @@ -0,0 +1,13 @@ +compile_ipc(NotificationServer.ipc NotificationServerEndpoint.h) +compile_ipc(NotificationClient.ipc NotificationClientEndpoint.h) + +set(SOURCES + ClientConnection.cpp + main.cpp + NotificationWindow.cpp + NotificationServerEndpoint.h + NotificationClientEndpoint.h +) + +serenity_bin(NotificationServer) +target_link_libraries(NotificationServer LibGUI LibIPC) diff --git a/Services/NotificationServer/ClientConnection.cpp b/Services/NotificationServer/ClientConnection.cpp index 9b8064de03..886f608624 100644 --- a/Services/NotificationServer/ClientConnection.cpp +++ b/Services/NotificationServer/ClientConnection.cpp @@ -25,9 +25,9 @@ */ #include "ClientConnection.h" -#include "NotificationClientEndpoint.h" #include "NotificationWindow.h" #include <AK/HashMap.h> +#include <NotificationServer/NotificationClientEndpoint.h> namespace NotificationServer { diff --git a/Services/NotificationServer/Makefile b/Services/NotificationServer/Makefile deleted file mode 100644 index 36a1e41652..0000000000 --- a/Services/NotificationServer/Makefile +++ /dev/null @@ -1,24 +0,0 @@ -OBJS = \ - main.o \ - ClientConnection.o \ - NotificationWindow.o - -PROGRAM = NotificationServer - -LIB_DEPS = GUI Gfx Core IPC - -EXTRA_CLEAN = NotificationServerEndpoint.h NotificationClientEndpoint.h - -*.cpp: NotificationServerEndpoint.h NotificationClientEndpoint.h - -NotificationServerEndpoint.h: NotificationServer.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -NotificationClientEndpoint.h: NotificationClient.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -install: - mkdir -p $(SERENITY_BASE_DIR)/Root/usr/include/NotificationServer/ - cp *.h $(SERENITY_BASE_DIR)/Root/usr/include/NotificationServer/ - -include ../../Makefile.common diff --git a/Services/ProtocolServer/CMakeLists.txt b/Services/ProtocolServer/CMakeLists.txt new file mode 100644 index 0000000000..3806d06104 --- /dev/null +++ b/Services/ProtocolServer/CMakeLists.txt @@ -0,0 +1,18 @@ +compile_ipc(ProtocolServer.ipc ProtocolServerEndpoint.h) +compile_ipc(ProtocolClient.ipc ProtocolClientEndpoint.h) + +set(SOURCES + Download.cpp + HttpDownload.cpp + HttpProtocol.cpp + HttpsDownload.cpp + HttpsProtocol.cpp + main.cpp + Protocol.cpp + PSClientConnection.cpp + ProtocolServerEndpoint.h + ProtocolClientEndpoint.h +) + +serenity_bin(ProtocolServer) +target_link_libraries(ProtocolServer LibCore LibIPC LibHTTP) diff --git a/Services/ProtocolServer/Makefile b/Services/ProtocolServer/Makefile deleted file mode 100644 index fa39255c53..0000000000 --- a/Services/ProtocolServer/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -OBJS = \ - PSClientConnection.o \ - Protocol.o \ - Download.o \ - HttpProtocol.o \ - HttpDownload.o \ - HttpsProtocol.o \ - HttpsDownload.o \ - main.o - -PROGRAM = ProtocolServer - -LIB_DEPS = HTTP TLS Crypto Core IPC - -EXTRA_CLEAN = ProtocolServerEndpoint.h ProtocolClientEndpoint.h - -*.cpp: ProtocolServerEndpoint.h ProtocolClientEndpoint.h - -ProtocolServerEndpoint.h: ProtocolServer.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -ProtocolClientEndpoint.h: ProtocolClient.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -include ../../Makefile.common diff --git a/Services/SystemMenu/CMakeLists.txt b/Services/SystemMenu/CMakeLists.txt new file mode 100644 index 0000000000..f8b7ba0651 --- /dev/null +++ b/Services/SystemMenu/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + PowerDialog.cpp +) + +serenity_bin(SystemMenu) +target_link_libraries(SystemMenu LibGUI) diff --git a/Services/SystemMenu/Makefile b/Services/SystemMenu/Makefile deleted file mode 100644 index 58a9369e16..0000000000 --- a/Services/SystemMenu/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - main.o \ - PowerDialog.o - -PROGRAM = SystemMenu - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/Services/SystemServer/CMakeLists.txt b/Services/SystemServer/CMakeLists.txt new file mode 100644 index 0000000000..fda6eb1bcc --- /dev/null +++ b/Services/SystemServer/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + Service.cpp +) + +serenity_bin(SystemServer) +target_link_libraries(SystemServer LibCore) diff --git a/Services/SystemServer/Makefile b/Services/SystemServer/Makefile deleted file mode 100644 index 0a29c53463..0000000000 --- a/Services/SystemServer/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -OBJS = \ - Service.o \ - main.o - -PROGRAM = SystemServer - -LIB_DEPS = Core - -install: - mkdir -p ../../Root/usr/include/SystemServer/ - cp *.h ../../Root/usr/include/SystemServer/ - -include ../../Makefile.common diff --git a/Services/TTYServer/CMakeLists.txt b/Services/TTYServer/CMakeLists.txt new file mode 100644 index 0000000000..69753bbea8 --- /dev/null +++ b/Services/TTYServer/CMakeLists.txt @@ -0,0 +1,6 @@ +set(SOURCES + main.cpp +) + +serenity_bin(TTYServer) +target_link_libraries(TTYServer LibC) diff --git a/Services/TTYServer/Makefile b/Services/TTYServer/Makefile deleted file mode 100644 index d1eb798683..0000000000 --- a/Services/TTYServer/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -OBJS = \ - main.o - -PROGRAM = TTYServer - -include ../../Makefile.common diff --git a/Services/Taskbar/CMakeLists.txt b/Services/Taskbar/CMakeLists.txt new file mode 100644 index 0000000000..5085461d50 --- /dev/null +++ b/Services/Taskbar/CMakeLists.txt @@ -0,0 +1,9 @@ +set(SOURCES + main.cpp + TaskbarButton.cpp + TaskbarWindow.cpp + WindowList.cpp +) + +serenity_bin(Taskbar) +target_link_libraries(Taskbar LibGUI) diff --git a/Services/Taskbar/Makefile b/Services/Taskbar/Makefile deleted file mode 100644 index f40e2a3032..0000000000 --- a/Services/Taskbar/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -OBJS = \ - TaskbarWindow.o \ - TaskbarButton.o \ - WindowList.o \ - main.o - -PROGRAM = Taskbar - -LIB_DEPS = GUI Gfx IPC Core - -include ../../Makefile.common diff --git a/Services/TelnetServer/CMakeLists.txt b/Services/TelnetServer/CMakeLists.txt new file mode 100644 index 0000000000..e19ae8bac6 --- /dev/null +++ b/Services/TelnetServer/CMakeLists.txt @@ -0,0 +1,8 @@ +set(SOURCES + Client.cpp + main.cpp + Parser.cpp +) + +serenity_bin(TelnetServer) +target_link_libraries(TelnetServer LibCore) diff --git a/Services/TelnetServer/Makefile b/Services/TelnetServer/Makefile deleted file mode 100644 index bfee24f38c..0000000000 --- a/Services/TelnetServer/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -OBJS = \ - Client.o \ - Parser.o \ - main.o - -PROGRAM = TelnetServer - -LIB_DEPS = Core - -include ../../Makefile.common diff --git a/Services/WebServer/CMakeLists.txt b/Services/WebServer/CMakeLists.txt new file mode 100644 index 0000000000..34b1f037c9 --- /dev/null +++ b/Services/WebServer/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + Client.cpp + main.cpp +) + +serenity_bin(WebServer) +target_link_libraries(WebServer LibCore LibHTTP) diff --git a/Services/WebServer/Makefile b/Services/WebServer/Makefile deleted file mode 100644 index ddc99a85ae..0000000000 --- a/Services/WebServer/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - Client.o \ - main.o - -PROGRAM = WebServer - -LIB_DEPS = HTTP Core - -include ../../Makefile.common diff --git a/Services/WindowServer/CMakeLists.txt b/Services/WindowServer/CMakeLists.txt new file mode 100644 index 0000000000..af14d6aa96 --- /dev/null +++ b/Services/WindowServer/CMakeLists.txt @@ -0,0 +1,27 @@ +compile_ipc(WindowServer.ipc WindowServerEndpoint.h) +compile_ipc(WindowClient.ipc WindowClientEndpoint.h) + +set(SOURCES + AppletManager.cpp + Button.cpp + ClientConnection.cpp + Clipboard.cpp + Compositor.cpp + Cursor.cpp + EventLoop.cpp + main.cpp + MenuBar.cpp + Menu.cpp + MenuItem.cpp + MenuManager.cpp + Screen.cpp + Window.cpp + WindowFrame.cpp + WindowManager.cpp + WindowSwitcher.cpp + WindowServerEndpoint.h + WindowClientEndpoint.h +) + +serenity_bin(WindowServer) +target_link_libraries(WindowServer LibCore LibGfx LibThread LibPthread LibIPC) diff --git a/Services/WindowServer/Makefile b/Services/WindowServer/Makefile deleted file mode 100644 index 064e2bd0f2..0000000000 --- a/Services/WindowServer/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -OBJS = \ - AppletManager.o \ - Button.o \ - ClientConnection.o \ - Clipboard.o \ - Compositor.o \ - Cursor.o \ - EventLoop.o \ - Menu.o \ - MenuBar.o \ - MenuItem.o \ - MenuManager.o \ - Screen.o \ - Window.o \ - WindowFrame.o \ - WindowManager.o \ - WindowSwitcher.o \ - main.o - -PROGRAM = WindowServer - -LIB_DEPS = Gfx Core Thread Pthread IPC - -*.cpp: WindowServerEndpoint.h WindowClientEndpoint.h - -WindowServerEndpoint.h: WindowServer.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -WindowClientEndpoint.h: WindowClient.ipc | IPCCOMPILER - @echo "IPC $<"; $(IPCCOMPILER) $< > $@ - -EXTRA_CLEAN = WindowServerEndpoint.h WindowClientEndpoint.h - -install: - mkdir -p ../../Root/usr/include/WindowServer/ - cp *.h ../../Root/usr/include/WindowServer/ - -include ../../Makefile.common diff --git a/Services/WindowServer/Window.cpp b/Services/WindowServer/Window.cpp index 4d506e1dc7..6f33fb1e3b 100644 --- a/Services/WindowServer/Window.cpp +++ b/Services/WindowServer/Window.cpp @@ -29,9 +29,9 @@ #include "Event.h" #include "EventLoop.h" #include "Screen.h" -#include "WindowClientEndpoint.h" #include "WindowManager.h" #include <AK/Badge.h> +#include <WindowServer/WindowClientEndpoint.h> namespace WindowServer { diff --git a/Shell/CMakeLists.txt b/Shell/CMakeLists.txt new file mode 100644 index 0000000000..77de643c33 --- /dev/null +++ b/Shell/CMakeLists.txt @@ -0,0 +1,7 @@ +set(SOURCES + main.cpp + Parser.cpp +) + +serenity_bin(Shell) +target_link_libraries(Shell LibCore LibLine) diff --git a/Shell/Makefile b/Shell/Makefile deleted file mode 100644 index 034c01d4e7..0000000000 --- a/Shell/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -OBJS = \ - Parser.o \ - main.o - -PROGRAM = Shell - -LIB_DEPS = Core Line - -include ../Makefile.common diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh index 17d4f34484..24a7ce9658 100755 --- a/Toolchain/BuildIt.sh +++ b/Toolchain/BuildIt.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash set -e +shopt -s globstar # This file will need to be run in bash, for now. @@ -12,7 +13,8 @@ echo "$DIR" ARCH=${ARCH:-"i686"} TARGET="$ARCH-pc-serenity" PREFIX="$DIR/Local" -SYSROOT="$DIR/../Root" +BUILD=$(realpath "$DIR/../Build") +SYSROOT="$BUILD/Root" MAKE="make" MD5SUM="md5sum" @@ -225,8 +227,18 @@ pushd "$DIR/Build/" "$MAKE" install-gcc install-target-libgcc || exit 1 echo "XXX serenity libc and libm" - ( cd "$DIR/../Libraries/LibC/" && "$MAKE" clean && "$MAKE" EXTRA_LIBC_DEFINES="-DBUILDING_SERENITY_TOOLCHAIN" && "$MAKE" install ) - ( cd "$DIR/../Libraries/LibM/" && "$MAKE" clean && "$MAKE" && "$MAKE" install ) + mkdir -p "$BUILD" + pushd "$BUILD" + CXXFLAGS="-DBUILDING_SERENITY_TOOLCHAIN" cmake .. + "$MAKE" LibC + install -D Libraries/LibC/libc.a Libraries/LibM/libm.a Root/usr/lib/ + SRC_ROOT=$(realpath "$DIR"/..) + for header in "$SRC_ROOT"/Libraries/Lib{C,M}/**/*.h; do + target=$(echo "$header" | sed -e "s@$SRC_ROOT/Libraries/LibC@@" -e "s@$SRC_ROOT/Libraries/LibM@@") + install -D "$header" "Root/usr/include/$target" + done + unset SRC_ROOT + popd echo "XXX build libstdc++" "$MAKE" all-target-libstdc++-v3 || exit 1 @@ -236,6 +248,7 @@ pushd "$DIR/Build/" if [ "$(uname -s)" = "OpenBSD" ]; then cd "$DIR/Local/libexec/gcc/i686-pc-serenity/$GCC_VERSION" && ln -sf liblto_plugin.so.0.0 liblto_plugin.so fi + popd popd diff --git a/Userland/CMakeLists.txt b/Userland/CMakeLists.txt new file mode 100644 index 0000000000..3e515cf1a4 --- /dev/null +++ b/Userland/CMakeLists.txt @@ -0,0 +1,26 @@ +file(GLOB CMD_SOURCES "*.cpp") + +foreach(CMD_SRC ${CMD_SOURCES}) + get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE) + add_executable(${CMD_NAME} ${CMD_SRC}) + target_link_libraries(${CMD_NAME} LibCore) + install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin) +endforeach() + +target_link_libraries(aplay LibAudio) +target_link_libraries(avol LibAudio) +target_link_libraries(copy LibGUI) +target_link_libraries(disasm LibX86) +target_link_libraries(functrace LibDebug LibX86) +target_link_libraries(html LibWeb) +target_link_libraries(lspci LibPCIDB) +target_link_libraries(man LibMarkdown) +target_link_libraries(md LibMarkdown) +target_link_libraries(notify LibGUI) +target_link_libraries(open LibDesktop) +target_link_libraries(pape LibGUI) +target_link_libraries(paste LibGUI) +target_link_libraries(pro LibProtocol) +target_link_libraries(test-crypto LibCrypto LibTLS LibLine) +target_link_libraries(tt LibPthread) +target_link_libraries(js LibJS LibLine) diff --git a/Userland/Makefile b/Userland/Makefile deleted file mode 100644 index dbf98133a9..0000000000 --- a/Userland/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -SRCS = $(wildcard *.cpp) -OBJS = ${SRCS:.cpp=.o} -APPS = ${SRCS:.cpp=} - -EXTRA_CLEAN = $(APPS) - -LIB_DEPS = Crypto TLS Web TextCodec GUI Gfx Desktop Audio Protocol IPC Thread Pthread PCIDB Markdown JS Core Line X86 Debug - -include ../Makefile.common - -all: $(APPS) - -list: - @echo $(APPS) - -$(APPS): %: %.o $(STATIC_LIB_DEPS) - @echo "LINK $@" - $(QUIET) $(CXX) -o $@ $< $(LDFLAGS) diff --git a/Userland/open.cpp b/Userland/open.cpp index f2b56d977a..bb90b04b4e 100644 --- a/Userland/open.cpp +++ b/Userland/open.cpp @@ -28,13 +28,10 @@ #include <AK/Vector.h> #include <LibCore/ArgsParser.h> #include <LibDesktop/Launcher.h> -#include <LibGUI/Application.h> #include <string.h> int main(int argc, char* argv[]) { - GUI::Application app(argc, argv); - Vector<const char*> urls_or_paths; Core::ArgsParser parser; parser.add_positional_argument(urls_or_paths, "URL or file path to open", "url-or-path"); |