-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.cln
80 lines (62 loc) · 2.24 KB
/
Makefile.cln
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
#
# ssystem 1.6 Makefile for pgcc/egcs compiler
#
# Remove -DLINUXJOY if your linux kernel doesn't support joysticks or
# you're running other OS
#
# Even if you're running Linux, make sure your joystick driver is v1.x
# I've tested it with the v1.2.13 included in the 2.2.1 kernel.
CC= gcc
# Your Mesa base directory
MESADIR=/root/Mesa-3.0
PREFIX=/usr/local
BINDIR=${PREFIX}/bin
# Where textures and star catalog files will be located, you may override this
# setting at run time
SDATADIR=.
CFLAGS = -Wall -O6 -I$(MESADIR)/include -fomit-frame-pointer -funroll-loops \
-fexpensive-optimizations -march=pentium -malign-loops=2 \
-malign-jumps=2 -malign-functions=2 -DLINUXJOY -DSDATADIR=\"${SDATADIR}\"
#CFLAGS = -g -Wall -I$(MESADIR)/include -DLINUXJOY -DSDATADIR=\"${SDATADIR}\"
LDFLAGS= -L/usr/X11R6/lib -L$(MESADIR)/lib -ljpeg -lglut -lMesaGLU -lMesaGL \
-lXext -lXmu -lXi -lX11 -lm
OBJ = cfgparse.tab.o lex.cfg.o ssystem.o init.o positions.o joystick.o \
cmdline.o keyboard.o mouse.o scrnsht.o sun.o timer.o util.o astrolib.o \
jpeg.o stars.o
LIBS =
all: ssystem
clean:
rm -f *.o *~ ssystem .depend cfgparse.tab.* cfgparse.output lex.cfg.c
ssystem: $(OBJ)
$(CC) -o ssystem $(OBJ) $(LDFLAGS) $(LIBS)
lex.cfg.c: cfglex.l cfgparse.tab.c
flex -i -Pcfg cfglex.l
cfgparse.tab.c: cfgparse.y
bison -d -v -p cfg cfgparse.y
install:
install -d $(SDATADIR)
cp *.jpg $(SDATADIR)
install stars.dat $(SDATADIR)
install ssystem.conf $(SDATADIR)
install ssystem $(BINDIR)
.c.o:
$(CC) -c $(CFLAGS) $<
dep:
gcc -MM -I$(MESADIR)/include *.c > .depend
# DO NOT DELETE
astrolib.o: astrolib.c vsop87.dat
cfgparse.tab.o: cfgparse.tab.c ssystem.h
cmdline.o: cmdline.c ssystem.h cfgparse.tab.h
init.o: init.c ssystem.h cfgparse.tab.h
joystick.o: joystick.c ssystem.h cfgparse.tab.h
jpeg.o: jpeg.c ssystem.h cfgparse.tab.h
keyboard.o: keyboard.c ssystem.h cfgparse.tab.h
lex.cfg.o: lex.cfg.c ssystem.h cfgparse.tab.h
mouse.o: mouse.c ssystem.h cfgparse.tab.h
positions.o: positions.c ssystem.h cfgparse.tab.h
scrnsht.o: scrnsht.c ssystem.h cfgparse.tab.h
ssystem.o: ssystem.c ssystem.h cfgparse.tab.h
stars.o: stars.c ssystem.h cfgparse.tab.h
sun.o: sun.c ssystem.h cfgparse.tab.h
timer.o: timer.c ssystem.h cfgparse.tab.h
util.o: util.c ssystem.h cfgparse.tab.h