-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmakefile
43 lines (29 loc) · 865 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
CFLAGS = -g -Wall -DSUN
# CFLAGS = -g -Wall -DDEC
#CC = gcc
CC = g++
CCF = $(CC) $(CFLAGS)
H = .
C_DIR = .
INCDIR = -I$(H)
LIBDIRS = -L$(C_DIR)
LIBS = -lclientReplFs
CLIENT_OBJECTS = network.o client.o
all: appl server
server: server.o network.o $(C_DIR)/libclientReplFs.a
$(CCF) -o replFsServer network.o server.o $(LIBDIRS) $(LIBS)
network.o: network.cpp network.h
$(CCF) -c $(INCDIR) network.cpp
server.o: server.cpp network.h server.h
$(CCF) -c $(INCDIR) server.cpp
appl: appl.o $(C_DIR)/libclientReplFs.a
$(CCF) -o appl appl.o $(LIBDIRS) $(LIBS)
appl.o: appl.c client.h appl.h
$(CCF) -c $(INCDIR) appl.c
$(C_DIR)/libclientReplFs.a: $(CLIENT_OBJECTS)
ar cr libclientReplFs.a $(CLIENT_OBJECTS)
ranlib libclientReplFs.a
client.o: client.cpp client.h network.h
$(CCF) -c $(INCDIR) client.cpp
clean:
rm -f appl replFsServer *.o *.a *.gch