summaryrefslogtreecommitdiffstats
path: root/databases/gtksql/files/patch-aa
blob: 766a6b22f4793af8276ab5003039b78f86b1c258 (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
48
49
50
51
52
53
--- Makefile.orig	Sat Mar 20 13:36:17 1999
+++ Makefile	Sat Mar 20 13:36:17 1999
@@ -1,8 +1,23 @@
+#
+# C compiler
+#
+CC?= gcc
+
+#
+# Local packages
+#
+LOCALBASE?= /usr/local
+
+#
+# Installation prefix
+#
+PREFIX?= $(LOCALBASE)
+
 # Here, what you need for Pgsql
-PGSQLIBS    = -L/usr/local/pgsql/lib -lpq
-PGSQLCFLAGS = -I/usr/local/pgsql/include
+PGSQLIBS    = -L$(LOCALBASE)/pgsql/lib -lpq -lcrypt
+PGSQLCFLAGS = -I$(LOCALBASE)/pgsql/include
 # Your favorite compilation options here :-)
-MCFLAGS  = -Wall -O -g
+CFLAGS?= -Wall -O -g
 
 # The database modules you want to be built
 DBOBJS  = postgres.o
@@ -12,19 +27,19 @@
 MOBJS   = main.o queries.o dialogs.o tables.o common.o export.o status.o
 
 OBJS    = $(MOBJS) $(DBOBJS)
-CFLAGS  = $(MCFLAGS) $(DBFLAGS)
+CFLAGS+=  $(DBFLAGS)
 
-GTKLIBS     = `gtk-config --libs`
-GTKCFLAGS   = `gtk-config --cflags`
+GTKLIBS     = `gtk10-config --libs`
+GTKCFLAGS   = `gtk10-config --cflags`
 
 all: $(OBJS)
-	gcc -o gtksql $(OBJS) $(PGSQLIBS) $(GTKLIBS) $(CFLAGS)
+	$(CC) -o gtksql $(OBJS) $(PGSQLIBS) $(GTKLIBS) $(CFLAGS)
 
 clean:
 	rm *.o gtksql
 
 install: all
-	cp gtksql $(DESTDIR)usr/bin/
+	cp gtksql $(PREFIX)/bin
 
 .c.o: 
OpenPOWER on IntegriCloud