| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
all:: qxw |
| 25 |
deb:: qxw |
| 26 |
|
| 27 |
PKG_CONFIG ?= pkg-config |
| 28 |
CFLAGS := -Wall -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -Wno-deprecated-declarations `$(PKG_CONFIG) --cflags glib-2.0` `$(PKG_CONFIG) --cflags gtk+-2.0` -I/opt/local/include `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS` -Wpedantic -Wextra -Wno-unused-parameter |
| 29 |
|
| •30 |
LFLAGS := -Wl,-Bsymbolic-functions -Wl,-z,relro -L/opt/local/lib `$(PKG_CONFIG) --libs glib-2.0` `$(PKG_CONFIG) --libs gtk+-2.0` -lm -ldl `pcre2-config --libs8` -pthread -lgthread-2.0 `dpkg-buildflags --get LDFLAGS` |
| 31 |
|
| 32 |
ifneq ($(filter deb,$(MAKECMDGOALS)),) |
| 33 |
CFLAGS:= $(CFLAGS) -g |
| 34 |
else |
| 35 |
CFLAGS:= $(CFLAGS) -g -O3 |
| 36 |
endif |
| 37 |
|
| 38 |
qxw: qxw.o filler.o treatment.o dicts.o gui.o draw.o alphabets.o deck.o Makefile |
| 39 |
$(CC) -rdynamic -Wall qxw.o filler.o treatment.o dicts.o gui.o draw.o alphabets.o deck.o $(LFLAGS) -o qxw |
| 40 |
|
| 41 |
qxw.o: qxw.c common.h qxw.h filler.h dicts.h treatment.h gui.h draw.h deck.h alphabets.h Makefile |
| 42 |
$(CC) $(CFLAGS) -c qxw.c -o qxw.o |
| 43 |
|
| 44 |
gui.o: gui.c common.h qxw.h filler.h dicts.h treatment.h gui.h draw.h alphabets.h Makefile |
| 45 |
$(CC) $(CFLAGS) -c gui.c -o gui.o |
| 46 |
|
| 47 |
filler.o: filler.c common.h filler.h treatment.h qxw.h gui.h dicts.h Makefile |
| 48 |
$(CC) $(CFLAGS) -c filler.c -o filler.o |
| 49 |
|
| 50 |
treatment.o: treatment.c common.h qxw.h dicts.h treatment.h gui.h Makefile |
| 51 |
$(CC) $(CFLAGS) -fno-strict-aliasing -c treatment.c -o treatment.o |
| 52 |
|
| 53 |
dicts.o: dicts.c common.h qxw.h gui.h dicts.h alphabets.h Makefile |
| 54 |
$(CC) $(CFLAGS) -fno-strict-aliasing -c dicts.c -o dicts.o |
| 55 |
|
| 56 |
draw.o: draw.c common.h qxw.h draw.h gui.h dicts.h Makefile |
| 57 |
$(CC) $(CFLAGS) -c draw.c -o draw.o |
| 58 |
|
| 59 |
deck.o: deck.c common.h qxw.h filler.h alphabets.h dicts.h draw.h treatment.h deck.h Makefile |
| 60 |
$(CC) $(CFLAGS) -c deck.c -o deck.o |
| 61 |
|
| 62 |
alphabets.o: alphabets.c common.h alphabets.h Makefile |
| 63 |
$(CC) $(CFLAGS) -c alphabets.c -o alphabets.o |
| 64 |
|
| 65 |
.PHONY: clean |
| 66 |
clean: |
| 67 |
rm -f treatment.o dicts.o draw.o filler.o gui.o qxw.o alphabets.o deck.o qxw |
| 68 |
|
| 69 |
.PHONY: install |
| 70 |
install: |
| 71 |
mkdir -p $(DESTDIR)/usr/games |
| 72 |
cp -a qxw $(DESTDIR)/usr/games/qxw |
| 73 |
mkdir -p $(DESTDIR)/usr/include/qxw |
| 74 |
cp -a qxwplugin.h $(DESTDIR)/usr/include/qxw/qxwplugin.h |
| 75 |
mkdir -p $(DESTDIR)/usr/share/applications |
| 76 |
cp -a qxw.desktop $(DESTDIR)/usr/share/applications/qxw.desktop |
| 77 |
mkdir -p $(DESTDIR)/usr/share/pixmaps |
| 78 |
cp -a qxw.xpm $(DESTDIR)/usr/share/pixmaps/qxw.xpm |
| 79 |
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps |
| 80 |
cp -a icon-48x48.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/qxw.png |
| 81 |
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/64x64/apps |
| 82 |
cp -a icon-64x64.png $(DESTDIR)/usr/share/icons/hicolor/64x64/apps/qxw.png |
| 83 |
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/96x96/apps |
| 84 |
cp -a icon-96x96.png $(DESTDIR)/usr/share/icons/hicolor/96x96/apps/qxw.png |
| 85 |
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/128x128/apps |
| 86 |
cp -a icon-128x128.png $(DESTDIR)/usr/share/icons/hicolor/128x128/apps/qxw.png |
| 87 |
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/256x256/apps |
| 88 |
cp -a icon-256x256.png $(DESTDIR)/usr/share/icons/hicolor/256x256/apps/qxw.png |
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|