-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
39 lines (30 loc) · 897 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
## Makefile for Connect
## Author- Abhishek Shrivastava <[email protected])
CC = g++
# CC_OPTIONS = -ggdb3 -Wall -std=c++11 -lpthread
CC_OPTIONS = -ggdb3 -w -std=c++11 -pthread -lcrypto -lssl
CFLAGS = $(CC_OPTIONS)
ODIR = obj
BUILD = build
BIN = bin
SDIR = src
CLIENT = nodeClient
.PHONY: clean cleano client
all: client
run:
$(CC) $(CC_OPTIONS) -o $(EXE) $(SRC)
./$(EXE)
config:
$(CC) $(CC_OPTIONS) $(SDIR)/configure.cpp -o $(BUILD)/$@
cd $(BUILD); ./$@
# this target compiles and links the client
client: clean
$(CC) -c $(SDIR)/logger.cpp $(CC_OPTIONS) -o $(ODIR)/logger.o
$(CC) -c $(SDIR)/$(CLIENT)/connect.cpp $(CC_OPTIONS) -o $(ODIR)/connect.o
$(CC) -c $(SDIR)/$(CLIENT)/nodeClient.cpp $(CC_OPTIONS) -o $(ODIR)/nodeClient.o
$(CC) $(ODIR)/*.o $(CC_OPTIONS) -o $(BUILD)/$@
cp $(BUILD)/* $(BIN)/
cleano:
rm -f $(ODIR)/*.o
clean:
rm -f $(BUILD)/* $(ODIR)/*.o