Lines 1-11
Link Here
|
1 |
--- Makefile.orig 2019-12-18 22:55:03 UTC |
1 |
--- Makefile.orig 2020-02-12 08:22:40.000000000 -0800 |
2 |
+++ Makefile |
2 |
+++ Makefile 2020-03-30 21:03:40.586161000 -0700 |
3 |
@@ -297,7 +297,7 @@ ifneq ($(and $(wildcard $(GIT_DIR)),$(sh |
3 |
@@ -108,6 +108,9 @@ |
4 |
$(NAME)src/doc/*.6 $(NAME)src/doc/frotz.conf* \ |
4 |
RANLIB ?= $(shell which ranlib) |
5 |
$(NAME)src/doc/Xresources > /dev/null |
5 |
AR ?= $(shell which ar) |
6 |
else |
6 |
PKG_CONFIG ?= pkg-config |
7 |
- @echo "Not in a git repository or git command not found. Cannot make a tarball." |
7 |
+ ifeq ($(shell which $(PKG_CONFIG)),) |
8 |
+ @echo "Not in a git repository or git command not found. Cannot make a tarball." |
8 |
+ NO_PKG_CONFIG = yes |
9 |
endif |
9 |
+ endif |
10 |
|
10 |
# For now, assume !windows == unix. |
11 |
all: $(FROTZ_BIN) $(DFROTZ_BIN) $(SFROTZ_BIN) |
11 |
OS_TYPE ?= unix |
|
|
12 |
UNAME_S := $(shell uname -s) |
13 |
@@ -122,13 +125,19 @@ |
14 |
LDFLAGS += -L/opt/local/lib |
15 |
CURSES_LDFLAGS += -lcurses |
16 |
else |
17 |
- # If we have pkg-config, that good. Otherwise maybe warn later. |
18 |
- ifneq (, $(shell which $(PKG_CONFIG))) |
19 |
- CURSES_LDFLAGS += $(shell $(PKG_CONFIG) $(CURSES) --libs) |
20 |
- CURSES_CFLAGS += $(shell $(PKG_CONFIG) $(CURSES) --cflags) |
21 |
+ |
22 |
+ # If we don't have pkg-config, try something obvious |
23 |
+ ifdef NO_PKG_CONFIG |
24 |
+ CURSES_LDFLAGS += -l$(CURSES) |
25 |
else |
26 |
- NO_PKG_CONFIG = yes |
27 |
+ ifneq ($(shell $(PKG_CONFIG) --exists),) |
28 |
+ CURSES_LDFLAGS += $(shell $(PKG_CONFIG) $(CURSES) --libs) |
29 |
+ CURSES_CFLAGS += $(shell $(PKG_CONFIG) $(CURSES) --cflags) |
30 |
+ else |
31 |
+ CURSES_LDFLAGS += -l$(CURSES) |
32 |
+ endif |
33 |
endif |
34 |
+ |
35 |
# NetBSD |
36 |
ifeq ($(UNAME_S),NetBSD) |
37 |
NETBSD = yes |