-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
60 lines (46 loc) · 1.07 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
cc=gcc
cflags= -std=c11 -Wfatal-errors -Wno-deprecated -Wno-deprecated-declarations
ldflags=-flto
DEBUG?=1
ifeq ($(DEBUG),1)
cflags += -g3
else
cflags += -O3
endif
# math library
ldflags=-lm
# GTK3.0
#cflags+=`pkg-config --cflags gtk+-3.0`
#ldflags+=`pkg-config --libs gtk+-3.0`
# GTK 4
cflags+=`pkg-config --cflags gtk4`
ldflags+=`pkg-config --libs gtk4`
dw_gui_files=src/dw_gui.c \
dw_app.o \
dw_app_window.o \
resources.c \
dw_channel.o \
dw_scope.o \
dw_conf.o \
dw_file.o \
dw_colors.o \
dw_app_runner.o \
common.o
dw_gui: $(dw_gui_files)
$(cc) $(cflags) $(dw_gui_files) $(ldflags) -o dw_gui
%.o: src/%.c
$(cc) -c $(cflags) $<
resources.c:
glib-compile-resources --target=resources.c --generate-source src/gresources.xml
clean:
rm *.o
rm dw_gui
rm resources.c
install_linux:
cp dw_gui /usr/local/bin
cp resources/deconwolf.desktop /usr/share/applications/
cp resources/deconwolf.png /usr/share/icons/hicolor/48x48/apps/
uninstall_linux:
rm /usr/local/bin/dw_gui
rm /usr/share/applications/deconwolf.desktop
rm /usr/share/icons/hicolor/48x48/apps/deconwolf.png