22
by onli
Replace autoconf-buildsystem with pkg-config/Makefile |
1 |
PREFIX ?= /usr |
2 |
DESTDIR ?= |
|
3 |
BINDIR ?= $(PREFIX)/bin |
|
4 |
APPDIR ?= $(PREFIX)/share/simdock |
|
5 |
ICONDIR ?= $(PREFIX)/share/pixmaps |
|
6 |
SRCDIR ?= src/ |
|
7 |
||
8 |
SHELL ?= /bin/sh |
|
30
by onli
Make it compile on Ubuntu 14.04-64 |
9 |
CC = g++ |
49
by onli
Minor: prepare debug |
10 |
# CC := clang --analyze
|
11 |
CCFLAGS ?= -march=native -O3 -flto -Wall |
|
42
by onli
react to header change |
12 |
DEPS = $(shell pkg-config --cflags glib-2.0 gconf-2.0 gtk+-2.0 libwnck-1.0 xcb-ewmh) |
13 |
DEPS += $(shell wx-config --cflags ) |
|
14 |
LDFLAGS = $(shell pkg-config --libs glib-2.0 gconf-2.0 gtk+-2.0 libwnck-1.0 xcb-ewmh) |
|
15 |
LDFLAGS += $(shell wx-config --libs) |
|
41
by onli
Support incremental compiles |
16 |
SRCS = $(SRCDIR)background.o $(SRCDIR)main_arguments.o $(SRCDIR)save_launchers.o $(SRCDIR)tasks.o $(SRCDIR)gconf_settings.o $(SRCDIR)settingsDialog.o $(SRCDIR)xstuff.o $(SRCDIR)interrupts.o $(SRCDIR)main_settings.o $(SRCDIR)sim_gconf.o $(SRCDIR)launcher_dialog.o $(SRCDIR)myFrame.o $(SRCDIR)simImage.o $(SRCDIR)main.o |
17 |
||
18 |
.PHONY: install clean uninstall |
|
19 |
||
20 |
all: simdock |
|
21 |
||
22 |
simdock: $(SRCS) |
|
49
by onli
Minor: prepare debug |
23 |
$(CC) $(CCFLAGS) $(SRCS) $(LDFLAGS) -o simdock |
41
by onli
Support incremental compiles |
24 |
|
42
by onli
react to header change |
25 |
%.o: %.cc %.h |
26 |
$(CC) $(CCFLAGS) $< $(DEPS) -c -o $@ |
|
27 |
||
41
by onli
Support incremental compiles |
28 |
%.o: %.cc |
42
by onli
react to header change |
29 |
$(CC) $(CCFLAGS) $< $(DEPS) -c -o $@ |
22
by onli
Replace autoconf-buildsystem with pkg-config/Makefile |
30 |
|
31 |
install: |
|
32 |
@install -d "$(DESTDIR)$(BINDIR)" "$(DESTDIR)$(APPDIR)" "$(DESTDIR)$(ICONDIR)" |
|
33 |
@install -m 0755 -v simdock "$(DESTDIR)$(BINDIR)/simdock" |
|
34 |
@install -m 0644 -v gfx/* "$(DESTDIR)$(APPDIR)/" |
|
35 |
@install -m 0644 -v gfx/simdock.png "$(DESTDIR)$(ICONDIR)/" |
|
36 |
||
41
by onli
Support incremental compiles |
37 |
clean: |
46
by onli
debian files for ppa |
38 |
-rm -v $(SRCS) simdock |
41
by onli
Support incremental compiles |
39 |
|
22
by onli
Replace autoconf-buildsystem with pkg-config/Makefile |
40 |
uninstall: |
41 |
@rm -vf "$(DESTDIR)$(BINDIR)/simdock" "$(DESTDIR)$(APPDIR)/*" "$(DESTDIR)$(ICONDIR)/simdock.png" |