0001-fix-makefile.patch 1.8 KB

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