summaryrefslogtreecommitdiff
path: root/plain_tool/Makefile
blob: e35d6b1a87b191a433a4cca495f68ef30316c3f1 (plain) (blame)
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
C = gcc
CFLAGS = -g -Wall
C++ = g++
CCFLAGS = -g -Wall
LD = g++
LDFLAGS = -g -Wall -O2 -lpthread

OBJS = plain_tool.o \
       signalController.o \
       PracticalSocket.o \
       log.o \
       options.o

EXECUTABLE = plain_tool

all: $(EXECUTABLE)

plain_tool: $(OBJS)
	$(LD) $(OBJS) -o $@ $(LDFLAGS)

signalController.o: ../signalController.cpp ../signalController.h
	$(C++) $(CCFLAGS) $< -c

PracticalSocket.o: ../PracticalSocket.cpp ../PracticalSocket.h
	$(C++) $(CCFLAGS) $< -c

log.o: ../log.cpp ../log.h
	$(C++) $(CCFLAGS) $< -c

options.o: options.cpp options.h
	$(C++) $(CCFLAGS) $< -c

plain_tool.o: plain_tool.cpp
	$(C++) $(CCFLAGS) $< -c

clean:
	rm -f *.o
	rm -f $(EXECUTABLE)