Initial commit
[resorg.git] / Makefile
blob7e2642e8464148e8e8beed20ddb70b09737e8a95
1 pkg = resorg
2 PREFIX = ${DESTDIR}/usr/local
3 BINDIR = ${PREFIX}/bin
4 DATADIR = ${PREFIX}/share
5 DOCDIR = ${DATADIR}/doc
7 CC=gcc
8 RELEASE_FLAGS = -O2
9 DEBUG_FLAGS = -O0 -g3 -ggdb3
10 COMMON_FLAGS = ${DEBUG_FLAGS}
12 CFLAGS = ${COMMON_FLAGS} -std=gnu99 -fPIC -Wall -Wextra `pkg-config --cflags gtk+-2.0 lilv-0` -I./include
13 LIBS = `pkg-config --libs gtk+-2.0 gmodule-export-2.0 lilv-0` -ldl
15 program = resorg
16 obj_files = main.o ui.o search-so.o ladspa/search.o dssi/search.o lv2/search.o
18 release: config
19 make COMMON_FLAGS="${RELEASE_FLAGS}" ${program}
21 debug: config
22 make COMMON_FLAGS="${DEBUG_FLAGS}" ${program}
24 ${program}: ${obj_files}
25 gcc ${LDFLAGS} -o ${program} ${obj_files} ${LIBS}
27 config: config.h
29 config.h: Makefile
30 echo "#define DATADIR \""${DATADIR}"\"" > config.h
32 install: ${program}
33 install -d ${DATADIR}/${pkg}
34 install -t ${DATADIR}/${pkg} browser.ui
35 install -t ${BINDIR} ${program}
37 install -d ${DOCDIR}/${pkg}
38 install -t ${DOCDIR}/${pkg} COPYING README TODO
40 uninstall:
41 rm -rf ${BINDIR}/${program} ${DOCDIR}/${pkg} ${DATADIR}/${pkg}
43 clean:
44 rm -rf ${program} ${obj_files}
46 .PHONY: clean uninstall release debug