diff options
author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-03-04 00:22:38 +0100 |
---|---|---|
committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-03-04 00:22:38 +0100 |
commit | 800061c0c5ebd8720d15a2cd10223c7f786a42c7 (patch) | |
tree | 4418b946643607e362dd8f5d6c2c573622a98259 | |
parent | 0b44bd901f76bb75a05fe36d1d16b9c01706739b (diff) |
use qmake to build
-rw-r--r-- | Makefile | 42 | ||||
-rw-r--r-- | config.mk | 4 | ||||
-rw-r--r-- | webtray.pro | 2 |
3 files changed, 9 insertions, 39 deletions
@@ -1,40 +1,12 @@ -SOURCE=$(shell find src -name "*.cpp") -OBJECT=$(SOURCE:src/%.cpp=${TARGET_DIRECTORY}/%.o) -DEPENDENCIES=$(SOURCE:src/%.cpp=${TARGET_DIRECTORY}/%.d) -include config.mk +default_target: build -default_target: all +build: + @mkdir -p target + @cd target && qmake6 .. && make -option: - @echo WebTray build options: - @echo SOURCE = ${SOURCE} - @echo OBJECT = ${OBJECT} - @echo DEPENDENCIES = ${DEPENDENCIES} - @echo CPPFLAGS = ${CPPFLAGS} - @echo LDFLAGS = ${LDFLAGS} +run: build + ./target/webtray ${URL} -${TARGET_DIRECTORY}: - @printf "create target directory\n" - @mkdir ${TARGET_DIRECTORY} --include ${DEPENDENCIES} - -${TARGET_DIRECTORY}/%.o: src/%.cpp Makefile - @printf "build $<\n" - @mkdir -p "$$(dirname $@)" - @${CC} ${CPPFLAGS} ${LDFLAGS} -MMD -MP -c $< -o $@ - -${OBJECT}: | ${TARGET_DIRECTORY} - -webtray: ${TARGET_DIRECTORY} ${OBJECT} - @printf "build $@\n" - @${CC} -o ${TARGET_DIRECTORY}/$@ ${OBJECT} ${LDFLAGS} ${CPPFLAGS} - -all: | ${TARGET_DIRECTORY} webtray - -clean: - @printf "cleaning up\n" - @rm -rf ${TARGET_DIRECTORY} - -.PHONY: clean +.PHONY: build diff --git a/config.mk b/config.mk deleted file mode 100644 index 1bbe8b3..0000000 --- a/config.mk +++ /dev/null @@ -1,4 +0,0 @@ -TARGET_DIRECTORY=target -CPPFLAGS=`pkg-config --cflags Qt6WebEngineWidgets Qt6WebEngineCore Qt6Core Qt6Gui` -Wall -LDFLAGS=`pkg-config --libs Qt6WebEngineWidgets Qt6WebEngineCore Qt6Core Qt6Gui Qt6Multimedia` -fPIC -CC=g++ diff --git a/webtray.pro b/webtray.pro new file mode 100644 index 0000000..536d000 --- /dev/null +++ b/webtray.pro @@ -0,0 +1,2 @@ +SOURCES = src/main.cpp src/permissionmanager.cpp src/tray.cpp src/webwindow.cpp +QT += core gui webenginecore webenginewidgets widgets |