summaryrefslogtreecommitdiff
blob: cf296236225e96d0818100c54dad8cebf41ad519 (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
 Makefile | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index f672e41..7dc6a6e 100644
--- a/Makefile
+++ b/Makefile
@@ -8,11 +8,11 @@ CONFIG_FILE=$(DESTDIR)/etc/multitail.conf
 CC?=gcc
 DEBUG=-g -O2 -Wall # -D_DEBUG # -pg #  -D_DEBUG  #-pg -W -pedantic # -pg #-fprofile-arcs
 ifeq ($(UTF8_SUPPORT),yes)
-LDFLAGS+=-lpanelw -lncursesw -lutil -lm
-CFLAGS+=-funsigned-char -D`uname` -DVERSION=\"$(VERSION)\" -DCONFIG_FILE=\"$(CONFIG_FILE)\" -DUTF8_SUPPORT -D_FORTIFY_SOURCE=2
+LIBS+=`$(PKG_CONFIG) --libs ncursesw panelw` -lutil -lm
+CFLAGS+=-funsigned-char -D`uname` -DVERSION=\"$(VERSION)\" $(DEBUG) -DCONFIG_FILE=\"$(CONFIG_FILE)\" -DUTF8_SUPPORT
 else
-LDFLAGS+=-lpanel -lncurses -lutil -lm
-CFLAGS+=-funsigned-char -D`uname` -DVERSION=\"$(VERSION)\" -DCONFIG_FILE=\"$(CONFIG_FILE)\" -D_FORTIFY_SOURCE=2
+LIBS+=`$(PKG_CONFIG) --libs ncurses panel` -lutil -lm
+CFLAGS+=-funsigned-char -D`uname` -DVERSION=\"$(VERSION)\" $(DEBUG) -DCONFIG_FILE=\"$(CONFIG_FILE)\"
 endif
 
 OBJS=utils.o mt.o error.o my_pty.o term.o scrollback.o help.o mem.o cv.o selbox.o stripstring.o color.o misc.o ui.o exec.o diff.o config.o cmdline.o globals.o history.o xclip.o
@@ -20,10 +20,10 @@ OBJS=utils.o mt.o error.o my_pty.o term.o scrollback.o help.o mem.o cv.o selbox.
 all: multitail
 
 multitail: $(OBJS)
-	$(CC) $(OBJS) $(LDFLAGS) -o multitail
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wall -W $(OBJS) -o $@ $(LIBS)
 
 multitail_ccmalloc: $(OBJS)
-	ccmalloc --no-wrapper $(CC) -Wall -W $(OBJS) $(LDFLAGS) -o ccmultitail
+	ccmalloc --no-wrapper $(CC) $(CFLAGS) $(LDFLAGS) -Wall -W $(OBJS) -o $@ $(LIBS)
 
 install: multitail
 	mkdir -p $(DESTDIR)$(PREFIX)/bin