You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-editors/sandy/files/sandy-0.4-gentoo.patch

50 lines
1019 B

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