summaryrefslogtreecommitdiff
blob: 61e2d7db86ace11bd1334a5a022a8af79728bb15 (plain)
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
diff -ur wmcliphist-0.6.orig/Makefile wmcliphist-0.6/Makefile
--- wmcliphist-0.6.orig/Makefile	2003-06-24 01:35:45.000000000 +0300
+++ wmcliphist-0.6/Makefile	2008-03-12 16:13:34.000000000 +0200
@@ -1,22 +1,18 @@
-CC = gcc
-
-INCLUDES = `gtk-config --cflags` -I. -Ifoodock -g
-
-DESTDIR = "/usr/local/bin"
+CC ?= gcc
+PREFIX = /usr
+INCLUDES = `pkg-config --cflags gtk+-2.0` -I. -Ifoodock
 
 # for normal use
-CFLAGS = -Wall -O2 -ansi -pedantic $(INCLUDES)
+CFLAGS += -Wall -ansi -pedantic $(INCLUDES)
 DEBUG = 
 
 # for debuggind purposes
 # ISO doesn't support macros with variable number of arguments so -pedantic
 # must not be used
-#CFLAGS = -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG
+#CFLAGS += -Wall -g -ansi $(INCLUDES) -DFNCALL_DEBUG
 #DEBUG = debug.o
 
-
-LFLAGS = `gtk-config --libs`
-
+LIBS = `pkg-config --libs gtk+-2.0`
 
 OBJECTS = wmcliphist.o clipboard.o gui.o rcconfig.o history.o hotkeys.o $(DEBUG)
 TARGET = wmcliphist
@@ -27,7 +23,7 @@
 	lclint $(INCLUDES) +posixlib *.c >lclint.log
 
 wmcliphist: $(OBJECTS) foodock/foodock.o
-	$(CC) $(LFLAGS) -o $@ $(OBJECTS) foodock/foodock.o
+	$(CC) $(LDFLAGS) $(OBJECTS) foodock/foodock.o $(LIBS) -o $@
 
 wmcliphist.o: wmcliphist.c wmcliphist.h \
 	icon/ico_60x60_black.xpm icon/ico_60x60_gray.xpm \
@@ -54,4 +50,4 @@
 	@(cd foodock && make clean)
 
 install:
-	cp wmcliphist $(DESTDIR)
+	cp wmcliphist $(DESTDIR)$(PREFIX)/bin