blob: 18d0a7126793b93fec658904e0476a314761fe7d (
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
|
$NetBSD: patch-aa,v 1.6 2010/01/31 23:45:58 joerg Exp $
--- makefile.orig Wed Apr 22 22:41:21 1998
+++ makefile Sun Sep 13 23:25:17 1998
@@ -14,16 +14,21 @@
OPTFLAG=
POSTPROCESS=strip
+INSTALLROOT=$(PREFIX)
+SOUNDS=$(INSTALLROOT)/share/galaxa/sounds
+IMAGES=$(INSTALLROOT)/share/galaxa/images
+DATA=$(INSTALLROOT)/share/galaxa
+DIRS= -DSOUNDS=\"$(SOUNDS)\" -DIMAGES=\"$(IMAGES)\" -DDATA=\"$(DATA)\"
-XLIB=-lX11
-CFLAGS=
+#XLIB=-lX11
+#CFLAGS=
# XLIB=-L/usr/openwin/lib -lX11
# CFLAGS=-I/usr/openwin/include
-# XLIB=-L /usr/X11R6/lib -lX11 -lcompat
-# CFLAGS=-I/usr/X11/include
+XLIB= -Wl,-R$(X11BASE)/lib -L$(X11BASE)/lib -lX11 #-lcompat
+CFLAGS= -I$(X11BASE)/include $(DIRS)
OBJECTS=galaxa.o hints.o randnum.o setup.o text.o soundmgr.o
@@ -39,30 +44,24 @@
galaxa: $(OBJECTS)
- $(CC) $(OBJECTS) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o galaxa
+ $(CC) $(XLIB) $(MATHLIB) $(CFLAGS) $(OPTFLAG) -o $@ $(OBJECTS)
chmod 755 galaxa
$(POSTPROCESS) galaxa
+install: galaxa
+ ${BSD_INSTALL_PROGRAM} galaxa $(INSTALLROOT)/bin
+ mkdir -p $(DATA)
+ mkdir -p $(SOUNDS)
+ mkdir -p $(IMAGES)
+ ${BSD_INSTALL_DATA} sounds/* $(SOUNDS)
+ ${BSD_INSTALL_DATA} images/* $(IMAGES)
+ ${BSD_INSTALL_DATA} galaxa-highs.dat ${INSTALLROOT}/share/examples/galaxa
-#-- App object--#
+#-- Dependencies --#
galaxa.o: galaxa.c hints.h randnum.h setup.h text.h soundmgr.h
- $(CC) galaxa.c -c
-
-
-#-- Lib objects--#
-
hints.o: hints.c hints.h
- $(CC) hints.c -c
-
-text.o: text.c text.h
- $(CC) text.c -c
-
+text.o: text.c text.h
soundmgr.o: soundmgr.c soundmgr.h
- $(CC) soundmgr.c -c
-
randnum.o: randnum.c randnum.h
- $(CC) randnum.c -c
-
setup.o: setup.c setup.h hints.h text.h soundmgr.h randnum.h
- $(CC) setup.c -c
|