-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
45 lines (27 loc) · 832 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
IDIR=./include
ODIR=./obj
SRCDIR=./src
BINDIR=./bin
CC=g++
CFLAGS= -std=c++0x -lpthread -I $(IDIR) -Wall
DEPS = $(shell find $(IDIR) -name *.h -o -name *.hpp)
_OBJ = myDate.o patient.o ageGroup.o myLowLvlIO.o sendReceive.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
OBJ1 = $(ODIR)/master.o
OBJ2 = $(ODIR)/worker.o
OBJ3 = $(ODIR)/whoClient.o
OBJ4 = $(ODIR)/whoServer.o
all: $(BINDIR)/master $(BINDIR)/worker $(BINDIR)/whoClient $(BINDIR)/whoServer
$(BINDIR)/master: $(OBJ1) $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
$(BINDIR)/worker: $(OBJ2) $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
$(BINDIR)/whoClient: $(OBJ3) $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
$(BINDIR)/whoServer: $(OBJ4) $(OBJ)
$(CC) -o $@ $^ $(CFLAGS)
$(ODIR)/%.o: $(SRCDIR)/%.cpp $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
.PHONY: clean clean_logs
clean:
rm -f $(ODIR)/*.o $(BINDIR)/*