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