-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
45 lines (25 loc) · 961 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
45
CXX=g++
CXXFLAGS= -c -v -Wall -mwindows
targetdir=bin
srcdir=src
smpldir=samples
all: $(targetdir)/interprocess.o $(targetdir)/client.exe $(targetdir)/host.exe
interprocess: $(targetdir)/interprocess.o
$(targetdir)/client.exe: $(targetdir)/interprocess.o client.o
$(CXX) client.o $(targetdir)/interprocess.o -o $(targetdir)/client.exe
client.o:$(smpldir)/client.c $(srcdir)/interprocess.h
$(CXX) $(CXXFLAGS) $(smpldir)/client.c
$(targetdir)/host.exe: $(targetdir)/interprocess.o host.o
$(CXX) host.o $(targetdir)/interprocess.o -o $(targetdir)/host.exe
host.o:$(smpldir)/host.c $(srcdir)/interprocess.h
$(CXX) $(CXXFLAGS) $(smpldir)/host.c
$(targetdir)/interprocess.o: $(srcdir)/interprocess.h $(srcdir)/interprocess.c
$(CXX) $(CXXFLAGS) $(srcdir)/interprocess.c -o $(targetdir)/interprocess.o
.PHONY: run
run:
start $(targetdir)/host.exe
$(targetdir)/client.exe
.PHONY: clean
clean:
rm -rfv *.o
rm -rfv bin/*.exe bin/*.o