summaryrefslogtreecommitdiff
path: root/games/trojka/files/patch-Makefile
blob: f8a39ba4ccf1c17d79d105b6d6408bd838801a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- Makefile.orig	1995-10-20 21:17:43 UTC
+++ Makefile
@@ -6,21 +6,31 @@
 #
 
 
-
+SCOREDIR=/var/games
+SCOREFILE=$(SCOREDIR)/trojka.scores
+CFLAGS+= -DSCOREFILE=\"$(SCOREFILE)\"
 OBJS= trojka.o screen.o scan.o hiscore.o system.o
 
+all:	freebsd	trojka.6.out
+
 make:
 	@echo please specify: hpux, xenix68, linux or sunos
 
 install:
-	cp trojka /usr/games
+	${BSD_INSTALL_PROGRAM} trojka $(DESTDIR)$(PREFIX)/bin
+	${BSD_INSTALL_MAN} trojka.6.out $(DESTDIR)$(PREFIX)/share/man/man6/trojka.6
+	mkdir -p $(DESTDIR)$(SCOREDIR)
+	touch $(DESTDIR)$(SCOREFILE).sample
+
+trojka.6.out:	trojka.6
+	sed "s|%%PREFIX%%|$(PREFIX)|" trojka.6 > trojka.6.out
 
 clean:
 	rm -f $(PROGS) *.o core a.out trojka.scores
 
 trojka: $(OBJS)
 #	$(CC) $(CFLAGS) $(OBJS) -lcurses -ltermlib -o trojka
-	$(CC) $(CFLAGS) $(OBJS) -lcurses -o trojka
+	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -lncurses -o trojka
 
 
 # patch for HP-UX, need 'codelibs'
@@ -53,3 +63,5 @@ hpux:
 
 linux:
 	make trojka "CFLAGS=-DLINUX"
+
+freebsd: trojka