termux-packages/packages/tty-solitaire/Makefile.patch

32 lines
977 B
Diff

diff -u -r ../tty-solitaire-1.0.0/Makefile ./Makefile
--- ../tty-solitaire-1.0.0/Makefile 2017-01-07 23:39:19.000000000 +0100
+++ ./Makefile 2017-09-23 01:38:01.226934201 +0200
@@ -1,14 +1,14 @@
-CC = gcc
-CFLAGS = -W -Wall -pedantic -ansi -std=c99 -g
+CC ?= gcc
+CFLAGS ?= -W -Wall -pedantic -ansi -std=c99 -g
-LDFLAGS = -lncursesw
+LDFLAGS += -lncursesw
# OS X installs ncurses with wide character support, but not as "libncurses"
ifeq ($(shell uname -s),Darwin)
LDFLAGS = -lncurses
endif
-PREFIX = /usr/local
+PREFIX ?= /usr/local
EXECUTABLE = ttysolitaire
SRC_DIR = src
@@ -40,7 +40,7 @@
.PHONY: test clean install uninstall
ttysolitaire: $(SRC_OBJECTS)
- $(CC) $(CFLAGS) $(SRC) -o $(EXECUTABLE) $(SRC_OBJECTS) $(LDFLAGS)
+ $(CC) $(CFLAGS) $(CPPFLAGS) $(SRC) -o $(EXECUTABLE) $(SRC_OBJECTS) $(LDFLAGS)
test: $(SRC_OBJECTS) $(TESTS_OBJECTS)
@$(CC) $(CFLAGS) $(TESTS_SRC) -o $(TESTS_EXECUTABLE) $(TESTS_OBJECTS) $(SRC_OBJECTS) $(LDFLAGS)