xref: /OK3568_Linux_fs/buildroot/package/open2300/0001-fix-makefile.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From b0a1f12349bee43040a889c7e74873cfb253b9d8 Mon Sep 17 00:00:00 2001
2From: Samuel Martin <s.martin49@gmail.com>
3Date: Thu, 6 Feb 2014 21:42:50 +0100
4Subject: [PATCH] fix makefile
5
6- allow to extend CFLAGS and CC_LDFLAGS
7- remove hard-coded include dirs. and lib. dirs. (which pointed to some
8  location in the host system)
9
10Signed-off-by: Samuel Martin <s.martin49@gmail.com>
11---
12 Makefile | 10 +++++-----
13 1 file changed, 5 insertions(+), 5 deletions(-)
14
15diff --git a/Makefile b/Makefile
16index 92a2cc0..1b54175 100755
17--- a/Makefile
18+++ b/Makefile
19@@ -37,9 +37,9 @@ MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o
20
21 VERSION = 1.11
22
23-CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\"
24-CC_LDFLAGS = -lm
25-CC_WINFLAG =
26+override CFLAGS += -Wall -O3 -DVERSION=\"$(VERSION)\"
27+override CC_LDFLAGS += -lm
28+CC_WINFLAG =
29 # For Windows - comment the two line above and un-comment the two lines below.
30 #CC_LDFLAGS = -lm -lwsock32
31 #CC_WINFLAG = -mwindows
32@@ -80,7 +80,7 @@ xml2300 : $(XMLOBJ)
33 	$(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
34
35 mysql2300:
36-	$(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
37+	$(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG)
38
39 pgsql2300: $(PGSQLOBJ)
40 	$(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq
41@@ -95,7 +95,7 @@ minmax2300: $(MINMAXOBJ)
42 	$(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG)
43
44 mysqlhistlog2300 :
45-	$(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient
46+	$(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG)
47
48
49 install:
50--
511.8.5.3
52
53