Blame view

Makefile 1.02 KB
Imanol-Mikel Barba Sabariego authored
1
CXXFLAGS = -Isrc/include
Imanol-Mikel Barba Sabariego authored
2
LDFLAGS = -Llib
Imanol-Mikel Barba Sabariego authored
3
LIBS = -lpthread
Imanol-Mikel Barba Sabariego authored
4
5
6
7
8
9
10
11
TARGETS = bin/client bin/server bin/socket.conf


.PHONY: all clean
	ifndef $(CXX)
		CXX = g++
	endif
Imanol-Mikel Barba Sabariego authored
12
bin/client: bin/client.o bin/Socket.o
Imanol-Mikel Barba Sabariego authored
13
14
15
16
17
18
19
20
21
22
23
24
	$(CXX) -o bin/client bin/client.o bin/Socket.o $(LDFLAGS) $(LIBS)
	strip bin/client

bin/client.o: src/client.cpp
	$(CXX) -o bin/client.o -c src/client.cpp $(CXXFLAGS)

bin/server.o: src/server.cpp src/include/server.h
	$(CXX) -o bin/server.o -c src/server.cpp $(CXXFLAGS)

bin/main_server.o: src/main_server.cpp
	$(CXX) -o bin/main_server.o -c src/main_server.cpp $(CXXFLAGS)
Imanol-Mikel Barba Sabariego authored
25
bin/server: bin/server.o bin/Socket.o bin/main_server.o src/include/server.h 
Imanol-Mikel Barba Sabariego authored
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
	$(CXX) -o bin/server bin/server.o bin/Socket.o bin/main_server.o $(LDFLAGS) $(LIBS)
	strip bin/server

bin/Socket.o: src/Socket.cpp src/include/Socket.h src/include/SocketException.h
	$(CXX) -o bin/Socket.o -c src/Socket.cpp $(CXXFLAGS)

bin/socket.conf:
	cp socket.conf bin/socket.conf

clean:
	rm -rf bin/*

docs:
	cd doc/doxygen;doxygen Doxyfile
	cd doc/latex; make	

all: $(TARGETS)