aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 75fd54f..a255057 100644
--- a/Makefile
+++ b/Makefile
@@ -17,6 +17,13 @@ PMAKE=pmake
INC:=$(shell pwd)/include
CFLAGS="$(OPTFLAGS) -I$(INC) -include bsdcompat.h -std=gnu99"
+# Slackware64's pmake ships with broken includes.
+ifeq ($(shell uname -m),x86_64)
+PMAKEHACK="MAKESYSPATH=$(shell pwd)/pmake.hack"
+else
+PMAKEHACK=/usr/share/mk
+endif
+
# Which games are we building?
DIRS=boggle bs cgram ching colorbars \
dab dm grdc hack hals_end larn \
@@ -33,10 +40,12 @@ SGIDBINS=tetris rogue hack
SAVEDIRS=hackdir larn
all:
- for dir in $(DIRS); do ( cd $$dir && $(PMAKE) CFLAGS=$(CFLAGS) ); done
+ export $(PMAKEHACK) ; \
+ for dir in $(DIRS); do ( cd $$dir && $(PMAKE) CFLAGS=$(CFLAGS) ); done ; \
[ -x boggle/mkdict/mkdict ] && cd boggle && $(PMAKE) realall
clean:
+ export $(PMAKEHACK) ; \
for dir in $(DIRS); do ( cd $$dir && $(PMAKE) clean ); done
install: install_files fix_perms