blob: 877c96805ef418b26c216fe282506f905ebcd63c (
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
|
--- a/config.mk
+++ b/config.mk
@@ -9,19 +9,19 @@
# includes and libs (ncurses)
INCS = -I. -I/usr/include
-LIBS = -L/usr/lib -lc -lncursesw
+LIBS = $(shell ${PKG_CONFIG} --libs ncurses)
# flags
-CPPFLAGS = -DVERSION=\"${VERSION}\"
+CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
#CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
#LDFLAGS = -s ${LIBS}
-CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
-LDFLAGS = ${LIBS}
+CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
+LDFLAGS += ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
# compiler and linker
-CC = cc
+CC ?= cc
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,7 @@
@echo "CC = ${CC}"
.c.o:
- @echo CC $<
- @${CC} -c ${CFLAGS} $<
+ ${CC} -c ${CFLAGS} $<
${OBJ}: config.h config.mk
@@ -25,8 +24,7 @@
@cp config.def.h $@
sandy: ${OBJ}
- @echo CC -o $@
- @${CC} -o $@ sandy.o ${LDFLAGS}
+ ${CC} ${CFLAGS} -o $@ sandy.o ${LDFLAGS}
clean:
@echo cleaning
|