-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
43 lines (36 loc) · 1.07 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
# ------------------------------------------------
# Makefile
#
# Project : LyreBird
# Name : Guo Chong
# Student ID : 301295753
# SFU username : armourg
# Lecture section : D1
# Instructor : Brain G.Booth
# TA : Scott Kristjanson
#
# Created by Armour on 11/09/2015
# Copyright (c) 2015 Armour. All rights reserved.
#
# ------------------------------------------------
CC = gcc
CFLAGS = -DMEMWATCH -DMEMWATCH_STDIO
LIBS = -lm
TARGET_SERVER = lyrebird.server
TARGET_CLIENT = lyrebird.client
OBJECTS_SERVER = lyrebird.server.o svr_func.o memwatch.o
OBJECTS_CLIENT = lyrebird.client.o cli_func.o dec_func.o decrypt.o scheduling.o line_io.o memwatch.o
.PHONY: all build_server build_client clean
all: build_server build_client
build_client: $(OBJECTS_CLIENT)
$(CC) $(CFLAGS) -o $(TARGET_CLIENT) $^ $(LIBS)
build_server: $(OBJECTS_SERVER)
$(CC) $(CFLAGS) -o $(TARGET_SERVER) $^ $(LIBS)
$%.o : $%.c $%.h
$(CC) $(CFLAGS) -c $< -o $@
clean:
-rm -f lyrebird.server
-rm -f lyrebird.client
-rm -f *.o
-rm -f *.log
-rm -f core