1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- --- 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
|