-
Notifications
You must be signed in to change notification settings - Fork 1
/
makefile
52 lines (43 loc) · 991 Bytes
/
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
###################################################################
#
# makefile
# For compiling Lyrebird client and server
#
# James Shephard
# CMPT 300 - D100 Burnaby
# Instructor Brian Booth
# TA Scott Kristjanson
#
###################################################################
.SUFFIXES: .h .o .c
# Options same for both client and server
CC = gcc
CCOPTS = -g -DMW_STDIO -std=c99
LIBS = -lm
# Client
CCMAIN1 = client.c
OBJS1 = client.o decrypt.o child.o common.o
CCEXEC1 = lyrebird.client
# Server
CCMAIN2 = parent.c
OBJS2 = common.o server.o
CCEXEC2 = lyrebird.server
all: $(CCEXEC1) $(CCEXEC2)
$(CCEXEC1): $(OBJS1) makefile
@echo Linking $@ . . .
$(CC) $(CCOPTS) $(OBJS1) -o $@ $(LIBS)
$(CCEXEC2): $(OBJS2) makefile
@echo Linking $@ . . .
$(CC) $(CCOPTS) $(OBJS2) -o $@ $(LIBS)
%.o: %.c
@echo Compiling $< . . .
$(CC) -c $(CCOPTS) $<
run: all
./$(CCEXEC)
clean:
rm -f $(OBJS1)
rm -f $(OBJS2)
rm -f $(CCEXEC1)
rm -f $(CCEXEC2)
rm -f core
rm -f memwatch.log