summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: c0050312b01b2f696ad69f94bdb86a94459747b5 (plain) (blame)
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

CFLAGS = -O2 -Os -fomit-frame-pointer -fstrength-reduce  -fthread-jumps -fexpensive-optimizations -pipe -I../include -DLinux -DBANK_ONLY
#CFLAGS = -O2 -Os -fomit-frame-pointer -fstrength-reduce  -fthread-jumps -fexpensive-optimizations -Wall -pipe -I../include -DLinux -DBANK_ONLY

.if defined(DEBUG)
CFLAGS += -g
.endif

.if !defined(NOTPTT)
CFLAGS += -DPTTBBS
.endif

SERVEROBJ = server.o bankstuff.o money.o
CLIENTOBJ = client.o bankstuff.o
EXTFILE = cache passwd stuff
EXTOBJ = cache.o passwd.o stuff.o
PROG = client server

.SUFFIXES: .c .o
.c.o: ; $(CC) $(CFLAGS) -c $*.c

all: $(PROG)

.if !defined(NOTPTT)

cache: ../mbbsd/cache.c
    $(CC) $(CFLAGS) -c ../mbbsd/cache.c

passwd: ../mbbsd/passwd.c
    $(CC) $(CFLAGS) -c ../mbbsd/passwd.c

stuff: ../mbbsd/stuff.c
    $(CC) $(CFLAGS) -c ../mbbsd/stuff.c

.else
# define your rules here.

.endif

server: $(SERVEROBJ) $(EXTFILE)
    $(CC) $(CFLAGS) -o server $(SERVEROBJ) $(EXTOBJ)

client: $(CLIENTOBJ)
    $(CC) $(CFLAGS) -o client $(CLIENTOBJ)

clean:
    rm -rf *.o $(PROG)