-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·59 lines (45 loc) · 1.77 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
SOUNDSERVER = koules.sndsrv.linux
INSTALLSOUND = True
SOUNDDIR = ./sounds/
SOUNDOBJS = sound.o
CC = /opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-gcc
OPTIMIZE = -O2 -ffast-math -Dlinux -Wall -DHAVEUSLEEP
CFLAGS = -std=gnu99 -DSDL32BPP -DGCW -DSOUND -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL/ -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/ \
-DSOUNDSERVER=\"$(SOUNDDIR)/$(SOUNDSERVER)\" \
-DSOUNDDIR=\"$(SOUNDDIR)\" \
-DSOUNDDEV=\"$(SOUNDDEV)\"
LFLAGS =
PROGS = koules
PROGS_O = koules.o sound.o menu.o gameplan.o font.o intro.o sdl/SDL_prims.o sdl/init.o sdl/SFont.o framebuffer.o cmap.o rcfiles.o server.o client.o sock.o objectsio.o
LIBS = -lFLAC -lSDL_mixer -lz -lSDL -lm -lpthread -ldl -L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux/uclibc/sysroot/usr/lib
all: progs $(SOUNDSERVER)
progs : $(PROGS)
objs: $(PROGS_O)
.c.o:
$(CC) $(OPTIMIZE) $(CFLAGS) -c -o $*.o $<
.c.s:
$(CC) $(OPTIMIZE) $(CFLAGS) -S -o $*.s $<
.o:
$(CC) $(OPTIMIZE) $(CFLAGS) $(LFLAGS) -o $* $*.o $(LIBS)
chmod a+rs,go-w $*
font.o: font.c
@echo please be patient.
@echo the font.c is big and ugly i ripped it from zgv.
@echo do you know about better one?
$(CC) $(OPTIMIZE) $(CFLAGS) -c $<
koules.sndsrv.linux.o: koules.sndsrv.linux.c
$(CC) $(OPTIMIZE) $(CFLAGS) -c $<
koules.o: koules.c
$(CC) $(OPTIMIZE) $(CFLAGS) -Wall -c $<
koules: $(PROGS_O)
$(CC) $(OPTIMIZE) $(CFLAGS) $(LFLAGS) -o koules $(PROGS_O) $(LIBS)
clean:
rm -f koules
rm -f core `find . -name '*.[oas]' -print`
rm -f core `find . -name '*~' -print`
rm -f core `find . -name '*.swp' -print`
rm -f core `find . -type f -name 'core' -print`
indent:
# indent -di16 *.c *.h svgalib/*.c svgalib/*.h xlib/*.c xlib/*.h
indent -di16 *.c *.h sdl/*.c sdl/*.h
#include .depend