-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (54 loc) · 2.26 KB
/
Makefile
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
##########################################################################
# This is a slightly better Makefile than before ... but its gonna need
# an overhaul very soon as its getting out of control.
#
# Makefile for v 2004 of battalion (OpenGL/Mesa version-openAL)
# ------------------------------------------------------------
# STEP 1: CHOOSE YOUR C/C++ COMPILER HERE (e.g. DCC, cc, CC, gcc, acc)
#
# (the program should compile with no warning messages - if you
# see a warning message please let me know about it)
# ------------------------------------------------------------
CC = gcc
# STEP 2: CHOOSE WHICH GRAPHICS LIBRARIES TO COMPILE WITH:
# MESA OR OPENGL
#
# ------------------------------------------------------------
#GLIB = -lMesaGL -lMesaGLU -lglut
# or
GLIB = -lGL -lGLU -lglut
# STEP 3: CHOOSE WHICH OS YOU ARE RUNNING
#
# Uncomment next line for windows version
#
# ------------------------------------------------------------
#OS = -DWIN32
# STEP 4: IF YOU WANT OPENAL SOUND UNCOMMENT NEXT LINES
# ELSE COMMENT THEM OUT
#
# ------------------------------------------------------------
#AUDIOLIB = -lopenal
#AUDIODEF = -I/usr/include/AL -DSOUND
# STEP 5: IF YOU WANT THE SPANISH VERSION UNCOMMENT NEXT LINE
# IF NO LANGUAGE DEFINED ENGLISH VERSION IS COMPILED
# ------------------------------------------------------------
#LANGUAGEDEF = -DSPANISHLANG
# STEP 6: CHOOSE ANY OPTIMIZATIONS OR ADD ANY SPECIAL INCLUSIONS
# ------------------------------------------------------------
CFLAGS = -g -I/usr/local/X11/include -I. $(AUDIODEF) $(LANGUAGEDEF)
# STEP 7: ADD ANY SPECIAL LIBRARY PATHS
# (USEFUL TO POINT TO WHERE THE MESA LIBRARIES RESIDE)
# ------------------------------------------------------------
LIBFLAGS =
# you should now be able to type 'make' and everything should be fine ...
#-------------------------------------------------------------------
TARGET = battalion
OBJ = main.o audio.o gprim.o graphics.o objects.o text.o update.o font.o tgaload.o
LIBS = -L/usr/X11R6/lib -lm
all: $(TARGET)
#$(OBJ): $(?:.o=.c)
# $(CC) $(CFLAGS) $(LIBFLAG) $(OS) $(WHICHLIB) $(AUDIOLIB) -c $?
$(TARGET): $(OBJ)
$(CC) -o $(TARGET) $(OBJ) $(LIBFLAGS) $(GLIB) $(LIBS) $(AUDIODEF) $(AUDIOLIB)
clean:
rm -f $(OBJ)