Mercurial > hg > syntilista
annotate Makefile.common @ 310:8541509ff8a0 default tip
Fix verbose build echos.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 29 Feb 2024 21:49:20 +0200 |
parents | 18bef142108d |
children |
rev | line source |
---|---|
302
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
1 ### |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
2 ### Generic |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
3 ### |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
4 QT_MODULES = Core Gui Widgets Sql PrintSupport Network |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
5 |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
6 QT_FLAGS += -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DUNICODE \ |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
7 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB \ |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
8 -DQT_SQL_LIB -DQT_PRINTSUPPORT_LIB -DQT_NETWORK_LIB |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
9 |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
10 |
50 | 11 ### |
262 | 12 ### Compiler flags |
50 | 13 ### |
302
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
14 XCFLAGS += -g -pipe -W -Wall -Wextra |
267
2400c2fac4b1
Add Makefile option for building with ASAN.
Matti Hamalainen <ccr@tnsp.org>
parents:
263
diff
changeset
|
15 |
2400c2fac4b1
Add Makefile option for building with ASAN.
Matti Hamalainen <ccr@tnsp.org>
parents:
263
diff
changeset
|
16 ifneq ($(ASAN),) |
302
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
17 XCFLAGS += -fsanitize=address |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
18 XLDFLAGS += -lasan |
267
2400c2fac4b1
Add Makefile option for building with ASAN.
Matti Hamalainen <ccr@tnsp.org>
parents:
263
diff
changeset
|
19 else |
302
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
20 XCFLAGS += -O2 |
267
2400c2fac4b1
Add Makefile option for building with ASAN.
Matti Hamalainen <ccr@tnsp.org>
parents:
263
diff
changeset
|
21 endif |
2400c2fac4b1
Add Makefile option for building with ASAN.
Matti Hamalainen <ccr@tnsp.org>
parents:
263
diff
changeset
|
22 |
302
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
23 CFLAGS += -std=c11 $(XCFLAGS) |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
24 CXXFLAGS += -std=c++17 $(XCFLAGS) |
52f0da883469
Remove Qt5 support, cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
299
diff
changeset
|
25 LDFLAGS += $(XLDFLAGS) |
184
87dfca9f704d
Move optimization and warning CFLAGS and CXXFLAGS to Makefile.gen
Matti Hamalainen <ccr@tnsp.org>
parents:
157
diff
changeset
|
26 |
262 | 27 |
28 ### | |
29 ### Tools, paths and directories | |
30 ### | |
208
e6a2658ae096
Enable building via clang++ (tested with 5.0).
Matti Hamalainen <ccr@tnsp.org>
parents:
192
diff
changeset
|
31 ifneq ($(BINTOOL_PREFIX),) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
32 CC = $(BINTOOL_PREFIX)gcc |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
33 CXX = $(BINTOOL_PREFIX)g++ |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
34 AR = $(BINTOOL_PREFIX)ar |
208
e6a2658ae096
Enable building via clang++ (tested with 5.0).
Matti Hamalainen <ccr@tnsp.org>
parents:
192
diff
changeset
|
35 endif |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 RANLIB = $(BINTOOL_PREFIX)ranlib |
49 | 37 WINDRES = $(BINTOOL_PREFIX)windres |
38 | |
262 | 39 |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
40 INSTALL ?= install |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 MKDIR ?= mkdir |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 MKDIR_P ?= $(MKDIR) -p |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 |
290
755fe3f8c08f
Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents:
279
diff
changeset
|
44 # Qt tools |
755fe3f8c08f
Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents:
279
diff
changeset
|
45 QT_RCC = $(QT_TOOL_PREFIX)rcc |
755fe3f8c08f
Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents:
279
diff
changeset
|
46 QT_MOC = $(QT_TOOL_PREFIX)moc |
755fe3f8c08f
Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents:
279
diff
changeset
|
47 QT_UIC = $(QT_TOOL_PREFIX)uic |
755fe3f8c08f
Minor build system cleanups in preparation for Qt6 support.
Matti Hamalainen <ccr@tnsp.org>
parents:
279
diff
changeset
|
48 |
262 | 49 |
50 ### | |
51 ### Main targets and objects | |
52 ### | |
80
c8fd927cd2c4
Restructure the project by placing source code, images into appropriate
Matti Hamalainen <ccr@tnsp.org>
parents:
76
diff
changeset
|
53 APP_IMG=img/ |
263
f0e180b13e05
More build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
54 APP_BIN=$(BINPATH)Syntilista$(BINEXT) |
233 | 55 |
56 APP_HDRS=\ | |
57 src/main.h \ | |
246
43a5e09bb832
Split some utility functions to util.{h,cpp}
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
58 src/util.h \ |
233 | 59 src/ui_viewtransactions.h \ |
60 src/ui_mainwindow.h \ | |
61 src/ui_editperson.h \ | |
62 src/ui_aboutwindow.h | |
63 | |
237
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
64 APP_OBJS=\ |
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
65 main.o \ |
246
43a5e09bb832
Split some utility functions to util.{h,cpp}
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
66 util.o \ |
237
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
67 editperson.o \ |
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
68 viewtransactions.o \ |
242
3d3ba5759cac
Move about-window code to separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
238
diff
changeset
|
69 aboutwindow.o \ |
237
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
70 sqlmodels.o \ |
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
71 printing.o \ |
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
72 resources.o \ |
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
73 moc_main.o \ |
54ab3f3e28c0
Split EditPerson and ViewTransactions to separate source files.
Matti Hamalainen <ccr@tnsp.org>
parents:
234
diff
changeset
|
74 runguard.o |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
75 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
76 LOGO_SVG ?= kampuscafe4.svg |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
77 LOGO_SRC_PNG ?= CafeKampus_logo_FINAL_RGB.png |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
78 |
52 | 79 ICON_PNGS = icon-64.png icon-48.png icon-32.png icon-16.png |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
80 LOGO_PNG = logo.png |
279
770d1ea07a49
Add LOGO_SIZE Makefile variable.
Matti Hamalainen <ccr@tnsp.org>
parents:
275
diff
changeset
|
81 LOGO_SIZE = 256 |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
82 |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
83 APP_RESOURCES += $(addprefix $(APP_IMG),$(LOGO_PNG) $(ICON_PNGS)) \ |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
84 COPYING.html |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
85 |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
86 DISTCLEAN_TARGETS += $(addprefix $(APP_IMG),$(LOGO_PNG) $(ICON_PNGS)) |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
87 |
56 | 88 |
50 | 89 # And target lists |
49 | 90 TARGETS = $(APP_BIN) |
258 | 91 NOBUILD_TARGETS += |
81
810ca71af506
Improve 'clean' target handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
80
diff
changeset
|
92 NOINST_TARGETS += |
233 | 93 CLEAN_TARGETS += icon.ico src/moc_*.cpp src/ui_*.h |
81
810ca71af506
Improve 'clean' target handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
80
diff
changeset
|
94 DISTCLEAN_TARGETS += |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
96 |
233 | 97 # Version |
98 APP_VERSION := $(shell cat VERSION) | |
99 comma:= , | |
100 APP_VERSION_COM := $(subst .,$(comma),$(APP_VERSION)) | |
101 CXXFLAGS += -DAPP_VERSION=\"$(APP_VERSION)\" | |
102 | |
103 | |
262 | 104 ### |
105 ### Functions and compilation/link commands | |
106 ### | |
258 | 107 ifneq ($(V),1) |
262 | 108 DO_CMD=/bin/echo -E " $(1) $(2)" && $(3) |
258 | 109 else |
310 | 110 DO_CMD=/bin/echo -E "$(3)" && $(3) |
258 | 111 endif |
263
f0e180b13e05
More build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
112 DO_MKDIR=if test ! -z "$(1)" -a ! -d "$(1)"; then /bin/echo -E " MKDIR $(1)"; mkdir -p "$(1)"; fi |
262 | 113 |
114 | |
115 COMPILE_C_OBJ = \ | |
116 @$(call DO_MKDIR,$(OBJPATH)) ; \ | |
117 $(call DO_CMD,CC,$<,$(CC) $(CFLAGS) $(DM_CFLAGS) -c -o $@ $< $(1)) | |
118 | |
119 LINK_C_BIN = \ | |
120 @$(call DO_MKDIR,$(BINPATH)) ; \ | |
121 $(call DO_CMD,LINK,$@,$(CC) -o $@ $(filter %.o %.a,$+) $(LDFLAGS) $(1)) | |
122 | |
123 COMPILE_CXX_OBJ = \ | |
124 @$(call DO_MKDIR,$(OBJPATH)) ; \ | |
125 $(call DO_CMD,CXX,$<,$(CXX) $(CXXFLAGS) $(DM_CFLAGS) -c -o $@ $< $(1)) | |
126 | |
127 LINK_CXX_BIN = \ | |
128 @$(call DO_MKDIR,$(BINPATH)) ; \ | |
129 $(call DO_CMD,LINK,$@,$(CXX) -o $@ $(filter %.o %.a,$+) $(LDFLAGS) $(1)) | |
130 | |
131 LINK_STATIC_LIB = \ | |
132 @$(call DO_MKDIR,$(OBJPATH)) ; \ | |
133 $(call DO_CMD,AR,$@ $(filter %.o,$+),$(AR) cru $@ $(filter %.o,$+)) ; \ | |
134 $(call DO_CMD,RANLIB,$@,$(RANLIB) $@) | |
258 | 135 |
136 | |
50 | 137 ### |
262 | 138 ### Generic target rules |
50 | 139 ### |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
140 all: $(NOBUILD_TARGETS) $(NOINST_TARGETS) $(TARGETS) |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
141 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
142 |
50 | 143 moc_predefs.h: |
144 @echo "" > $(OBJPATH)dummy.cpp | |
263
f0e180b13e05
More build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
145 @$(call DO_CMD,CXX,$@,$(CXX) $(CXXFLAGS) -dM -E -o $@ $(OBJPATH)dummy.cpp) |
50 | 146 |
147 moc_%.cpp: %.h $(QT_MOC_RULES) | |
299
3dc88d3814b3
Rename some Makefile variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
292
diff
changeset
|
148 @$(call DO_CMD,$(QT_VERSION_PREFIX):MOC,$@ $<,$(QT_MOC) $(QT_FLAGS) $(QT_MOC_FLAGS) $(QT_INCLUDES) $< -o $@) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
149 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
150 ui_%.h: %.ui |
292
47ecb4b14e3e
Show Qt version we are building for in QT tool names.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
151 @$(call DO_CMD,$(QT_VERSION_PREFIX):UIC,$@ $<,$(QT_UIC) $(QT_UIC_FLAGS) $< -o $@) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
152 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
153 |
233 | 154 $(OBJPATH)%.o: src/%.cpp src/%.h |
299
3dc88d3814b3
Rename some Makefile variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
292
diff
changeset
|
155 $(call COMPILE_CXX_OBJ, $(QT_FLAGS) $(QT_INCLUDES)) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
156 |
233 | 157 $(OBJPATH)%.o: src/%.cpp |
299
3dc88d3814b3
Rename some Makefile variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
292
diff
changeset
|
158 $(call COMPILE_CXX_OBJ, $(QT_FLAGS) $(QT_INCLUDES)) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
159 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
160 |
50 | 161 ### |
162 ### Windows specific rules | |
163 ### | |
56 | 164 %.rc: %.rc.in icon.ico VERSION |
50 | 165 @sed -e "s/@APP_VERSION@/$(APP_VERSION)/g;s/@APP_VERSION_COM@/$(APP_VERSION_COM)/g;s#@APP_EXE@#$(notdir $(APP_BIN))#g" < $< > $@ |
49 | 166 |
233 | 167 $(OBJPATH)%.o: src/%.rc |
263
f0e180b13e05
More build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
168 @$(call DO_CMD,WINDRES,$<,$(WINDRES) $< -O coff -o $@) |
49 | 169 |
170 | |
171 ### | |
172 ### Application rules | |
173 ### | |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
174 ifneq ($(LOGO_SRC_SVG),) |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
175 $(APP_IMG)icon-%.png: $(APP_IMG)$(LOGO_SRC_SVG) |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
176 inkscape --export-area-page --export-type=png -w $(patsubst $(APP_IMG)icon-%.png,%,$@) -h $(patsubst $(APP_IMG)icon-%.png,%,$@) --export-filename="$@" "$<" |
192
dfe5e8d7c58a
Use the finalized Cafe Kampus logo.
Matti Hamalainen <ccr@tnsp.org>
parents:
184
diff
changeset
|
177 |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
178 $(APP_IMG)$(LOGO_PNG): $(APP_IMG)$(LOGO_SRC_SVG) |
279
770d1ea07a49
Add LOGO_SIZE Makefile variable.
Matti Hamalainen <ccr@tnsp.org>
parents:
275
diff
changeset
|
179 inkscape --export-area-page --export-type=png -w $(LOGO_SIZE) -h $(LOGO_SIZE) --export-filename="$@" "$<" |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
180 else |
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
181 $(APP_IMG)icon-%.png: $(APP_IMG)$(LOGO_SRC_PNG) |
192
dfe5e8d7c58a
Use the finalized Cafe Kampus logo.
Matti Hamalainen <ccr@tnsp.org>
parents:
184
diff
changeset
|
182 convert "$<" -scale "$(patsubst $(APP_IMG)icon-%.png,%,$@)x$(patsubst $(APP_IMG)icon-%.png,%,$@)" "$@" |
dfe5e8d7c58a
Use the finalized Cafe Kampus logo.
Matti Hamalainen <ccr@tnsp.org>
parents:
184
diff
changeset
|
183 |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
184 $(APP_IMG)$(LOGO_PNG): $(APP_IMG)$(LOGO_SRC_PNG) |
279
770d1ea07a49
Add LOGO_SIZE Makefile variable.
Matti Hamalainen <ccr@tnsp.org>
parents:
275
diff
changeset
|
185 convert "$<" -scale "$(LOGO_SIZE)x$(LOGO_SIZE)" "$@" |
275
d1f34cbc306e
Improve logo/icons intermediate building process.
Matti Hamalainen <ccr@tnsp.org>
parents:
274
diff
changeset
|
186 endif |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
187 |
80
c8fd927cd2c4
Restructure the project by placing source code, images into appropriate
Matti Hamalainen <ccr@tnsp.org>
parents:
76
diff
changeset
|
188 icon.ico: $(addprefix $(APP_IMG),$(ICON_PNGS)) |
263
f0e180b13e05
More build system improvements.
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
189 @$(call DO_CMD,CONVERT,$+ -> $@,convert $+ $@) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
190 |
233 | 191 src/%.cpp: src/%.qrc $(APP_RESOURCES) |
292
47ecb4b14e3e
Show Qt version we are building for in QT tool names.
Matti Hamalainen <ccr@tnsp.org>
parents:
291
diff
changeset
|
192 @$(call DO_CMD,$(QT_VERSION_PREFIX):RCC,$@ $<,$(QT_RCC) -name "Syntilista" $< -o $@) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
193 |
233 | 194 $(OBJPATH)main.o: src/main.cpp $(APP_HDRS) VERSION |
299
3dc88d3814b3
Rename some Makefile variables.
Matti Hamalainen <ccr@tnsp.org>
parents:
292
diff
changeset
|
195 $(call COMPILE_CXX_OBJ, $(QT_FLAGS) $(QT_INCLUDES)) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
196 |
52 | 197 $(APP_BIN): $(addprefix $(OBJPATH),$(APP_OBJS)) $(APP_DEP_LIBS) | $(APP_DEPS) |
268 | 198 $(call LINK_CXX_BIN, $(APP_LIBS)) |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
199 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
200 |
50 | 201 ### |
202 ### Special targets | |
203 ### | |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
204 clean: |
81
810ca71af506
Improve 'clean' target handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
80
diff
changeset
|
205 -$(RM) $(TARGETS) $(NOINST_TARGETS) $(CLEAN_TARGETS) $(OBJPATH)*.o |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
206 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
207 distclean: clean |
52 | 208 -$(RM) $(DISTCLEAN_TARGETS) *~ core *.core |
48
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
209 |
200ec310660a
Begin revamp of the buildsystem, don't use qmake anymore.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
210 .PHONY: clean distclean all |