blob: 33baeffe4cab0e75cedae83b0f5e88af34760b6b (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
$NetBSD: patch-aa,v 1.5 2008/02/29 20:53:02 jlam Exp $
--- Makefile.orig 1996-11-11 09:43:22.000000000 -0500
+++ Makefile
@@ -25,21 +25,26 @@ REVISION=0
INTERNAL_REVISION=7
ARCFILE=netmaj-$(VERSION).$(REVISION).$(INTERNAL_REVISION).tar.gz
-SHELL=/bin/sh
+SHELL=${SH}
# Install Directory
-LIBDIR=/usr/local/lib/netmaj
-BINDIR=/usr/local/bin
-PERL=/usr/bin/perl
+LIBDIR=${PREFIX}/lib/netmaj
+BINDIR=${PREFIX}/bin
+PERL=${PERL5}
STD_CFLAGS=-I. -Ilib -DNETMAJ_LIB=\"$(LIBDIR)\"
-# for 386BSD,FreeBSD,NetBSD...
-CC=gcc
-OS_CFLAGS= -O -g -DUSE_SGTTY -DUSE_FWOPEN -DUSE_TERMCAP -DHAVE_GETTIMEOFDAY
+# for pkgsrc
+CC=cc
RANLIB=ranlib
-LIBS=
-CURSES= -lcurses -ltermcap
-LDFLAGS = -Llib
+include config.mk
+
+# for 386BSD,FreeBSD,NetBSD...
+#CC=gcc
+#OS_CFLAGS= -O -g -DUSE_SGTTY -DUSE_FWOPEN -DUSE_TERMCAP -DHAVE_GETTIMEOFDAY
+#RANLIB=ranlib
+#LIBS=
+#CURSES= -lcurses -ltermcap
+#LDFLAGS = -Llib
# for linux
#CC=cc
@@ -118,7 +123,7 @@ OBJS_STAND =stand.o
OBJS_PLVIEW = plview.o cui.o
OBJS_NETMAJ1 =netmaj1.o cui.o
-all: libs server auto client server_kill netmaj1 plview z x
+all: server auto client server_kill netmaj1 plview z
z: proxyserver inputserver proxyclient
@@ -179,35 +184,35 @@ player_info: player_info.in Makefile
chmod 755 player_info
install: netmaj player_info
- -if test ! -d ${BINDIR}; then \
- mkdir ${BINDIR}; fi
- -if test ! -d ${LIBDIR}; then \
- mkdir ${LIBDIR}; fi
+ -if test ! -d ${DESTDIR}${BINDIR}; then \
+ mkdir ${DESTDIR}${BINDIR}; fi
+ -if test ! -d ${DESTDIR}${LIBDIR}; then \
+ mkdir ${DESTDIR}${LIBDIR}; fi
-./server_kill
- cp server client auto server_kill player_info $(LIBDIR)
- cp proxyserver inputserver proxyclient $(LIBDIR)
- cp netmaj.hlp $(LIBDIR)
- cp netmaj netmaj1 plview $(BINDIR)
+ cp server client auto server_kill player_info $(DESTDIR)$(LIBDIR)
+ cp proxyserver inputserver proxyclient $(DESTDIR)$(LIBDIR)
+ cp netmaj.hlp $(DESTDIR)$(LIBDIR)
+ cp netmaj netmaj1 plview $(DESTDIR)$(BINDIR)
-if test -d xui; then \
(cd xui; make install CC="$(CC)" OS_CFLAGS="$(OS_CFLAGS)" \
RANLIB="$(RANLIB)" LIBS="$(LIBS)" LIBDIR="$(LIBDIR)" \
- BINDIR="$(BINDIR)" \
+ BINDIR="$(BINDIR)" DESTDIR="$(DESTDIR)" \
); fi
install-remote: netmaj server server_kill auto proxyclient
- -if test ! -d ${BINDIR}; then \
- mkdir ${BINDIR}; fi
- -if test ! -d ${LIBDIR}; then \
- mkdir ${LIBDIR}; fi
- cp server auto server_kill proxyclient $(LIBDIR)
- cp netmaj $(BINDIR)
+ -if test ! -d ${DESTDIR}${BINDIR}; then \
+ mkdir ${DESTDIR}${BINDIR}; fi
+ -if test ! -d ${DESTDIR}${LIBDIR}; then \
+ mkdir ${DESTDIR}${LIBDIR}; fi
+ cp server auto server_kill proxyclient $(DESTDIR)$(LIBDIR)
+ cp netmaj $(DESTDIR)$(BINDIR)
install-pf:
- cp *.pf $(LIBDIR)
+ cp *.pf $(DESTDIR)$(LIBDIR)
-if test -d xui; then \
(cd xui; make install-pf CC="$(CC)" OS_CFLAGS="$(OS_CFLAGS)" \
RANLIB="$(RANLIB)" LIBS="$(LIBS)" LIBDIR="$(LIBDIR)" \
- BINDIR="$(BINDIR)" \
+ BINDIR="$(BINDIR)" DESTDIR="$(DESTDIR)" \
); fi
clean:
|