From ee67778ca3abc6a091e5585e4c44d7c1a39e5833 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 7 May 2015 17:30:06 -0400 Subject: Fix 64-bit build --- Makefile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Makefile') 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 -- cgit v1.2.3