File: makefile

package info (click to toggle)
bb 1.2-9
  • links: PTS
  • area: main
  • in suites: potato
  • size: 4,152 kB
  • ctags: 3,357
  • sloc: ansic: 43,440; sh: 152; makefile: 64; asm: 36
file content (198 lines) | stat: -rw-r--r-- 5,757 bytes parent folder | download | duplicates (2)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
############################################################################
#									   #
# Instructions:								   #
# -------------								   #
# 1. Select the appropriate OS-specific options for your system		   #
# 2. Choose from the options section					   #
# 3. Type "make" and all should (hopefully) work...			   #
#									   #
############################################################################

############################################################################
############################################################################
##									  ##
##			OS-SPECIFIC DEFINITIONS				  ##
##									  ##
############################################################################
############################################################################

############################################################################
#
# Linux/FreeBSD/OSS definitions
#
# for output on linux and FreeBSD Open Sound System (OSS) (/dev/dsp) or 
# Ultrasound driver (/dev/gus)
#
############################################################################

OSDEF=-DOSS
CC = gcc

# if you want to use the Ultra driver uncomment the 3 lines below. 
# You need a Gravis Ultrasound and the library from the Linux Ultrasound 
# project to do this, from http://romeo.pf.jcu.cz/~perex/ultra/
# ULTRA=-DULTRA
# ULTRALIB=-lgus
# ULTRADRV=drv_ultr.o

#for an old ultrasound api
#ULTRA=-DULTRA
#ULTRALIB=-lgus
#ULTRADRV=drv_old.o

#OSFLAGS = -O3 $(OSDEF) $(ULTRA)
OSFLAGS = -O3 $(OSDEF) 
#debug options
#OSFLAGS = -g $(OSDEF) $(ULTRA)

#LIBS= -lm $(ULTRALIB)
LIBS= -lm 
#DRIVERS = drv_vox.o $(ULTRADRV)
DRIVERS = drv_vox.o

############################################################################
#
# SUN / Solaris definitions (including Solaris/i386)
#
# for output on the Sun audio device (/dev/audio)
#
############################################################################

# for SunOS 4.1.x, enable -DSUNOS, for Solaris 2.x, enable -DSOLARIS
#OSDEF=-DSUNOS -I/usr/5include
#OSDEF=-DSOLARIS

#CC = gcc

# defines
# For Solaris/i386, remove the -DMM_BIG_ENDIAN
#CDEFS=-DNEED_UNISTD -DMM_BIG_ENDIAN -DSUN $(OSDEF)

# Enable this for speed on v8 sparc (microSPARC and newer)
#OSFLAGS = -g -O2 -mv8 -msupersparc -I./include $(CDEFS)
# Enable this to work on v7 sparc
#OSFLAGS = -g -O2 -I./include $(CDEFS)
# SPARCompiler C 4.0 options
#OSFLAGS = -Iinclude -fast -s $(CDEFS)

#LIBS=-L/usr/5lib -lm
# Disable the above and use this on Solaris
#LIBS=-lm -lposix4

#DRIVERS = drv_sun.o

############################################################################
#
# DEC Alpha / AudioFile definitions
#
# systems using Digital AudioFile library, available from 
# ftp://crl.dec.com/pub/DEC/AF
#
############################################################################

#OSDEF=-DALPHA

# Choose between DEC cc
#CC = cc -g3

# and GNU gcc
#CC = gcc -g


# On my system I have to do
#INCDIR=-I/usr/local/vol/AudioFile/include
#LIBDIR=-L/usr/local/vol/AudioFile/lib

#OSFLAGS = -O2 $(OSDEF) $(INCDIR)
#DRIVERS = drv_af.o
#LIBS=$(LIBDIR) -lm -lAF

############################################################################
#
#   AIX definitions
#
############################################################################
 
#OSDEF=-DAIX
#CC = gcc

#OSFLAGS = -O3 -fsigned-char $(OSDEF) -DMM_BIG_ENDIAN

#LIBS= -lm
#DRIVERS = drv_aix.o 

############################################################################
#
#   HP 9000 series / HP-UX definitions
#
############################################################################

#OSDEF=-DHPUX

# To use gcc instead of HP's cc, uncomment the following two lines.
# HP's cc (NOT THE BUNDLED ONE) produces about 6% faster code here 
#CC = gcc
#OSFLAGS = -O3 -funroll-loops -mpa-risc-1-1 -mschedule=7100 $(OSDEF) -DMM_BIG_ENDIAN

# OR use HP's CC:

#CC = cc
#OSFLAGS = -Ae +O3 $(OSDEF) -DMM_BIG_ENDIAN

# Both need these:
#LIBS = -L/lib/pa1.1 -lm
#DRIVERS = drv_hp.o

############################################################################
#
#   SGI definitions
#
############################################################################

#OSDEF=-DSGI
#CC = gcc

#CFLAGS = -O2 $(OSDEF) $(ZIP) $(USLEEP) $(NCURSES) -DMM_BIG_ENDIAN
#
#LIBS= -laudio -lm 
#DRIVERS = drv_sgi.o

############################################################################
############################################################################
##									  ##
##			OPTIONS DEFINITIONS				  ##
##									  ##
############################################################################
############################################################################

# -s will renice the program to -19, -S will attempt to give it a
# realtime priority (ie. it'll get all the cpu it wants) using
# sched_setscheduler(). Default behaviour remains the same, i.e. to not use
# these
#SNAG=-DCPUTIME_SNAGGER

# Does your system have usleep()? If not, you'll need to uncomment this...
#USLEEP=-DNEEDS_USLEEP

CFLAGS = $(OSFLAGS) $(SNAG) $(USLEEP) 

############################################################################
############################################################################
##									  ##
##  Common / standard definitions - shouldn't need to touch below here!   ##
##									  ##
############################################################################
############################################################################

LOADERS = load_s3m.o 
OBJ = main_ux.o virtch.o mloader.o mdriver.o mplayer.o munitrk.o mmio.o 

all:	../bb_snd_server

../bb_snd_server: $(OBJ) $(LOADERS) $(DRIVERS) 
	$(CC) -Dunix $(CFLAGS) $(OBJ) $(LOADERS) $(DRIVERS) -o $@ $(LIBS)
	strip $@

clean:
	rm -f $(OBJ) $(OBJ2) $(DRIVERS) $(ARC) $(LOADERS) ../bb_snd_server