-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (23 loc) · 681 Bytes
/
Makefile
File metadata and controls
33 lines (23 loc) · 681 Bytes
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
CXX = g++ -fPIC
NETLIBS= -lnsl
all: daytime-server daytime-client use-dlopen hello.so myhttpd git-commit
daytime-client : daytime-client.o
$(CXX) -o $@ $@.o $(NETLIBS)
daytime-server : daytime-server.o
$(CXX) -o $@ $@.o $(NETLIBS)
myhttpd : myhttpd.o
$(CXX) -o $@ $@.o $(NETLIBS) -lpthread
use-dlopen: use-dlopen.o
$(CXX) -o $@ $@.o $(NETLIBS) -ldl
hello.so: hello.o
ld -G -o hello.so hello.o
%.o: %.cc
@echo 'Building $@ from $<'
$(CXX) -o $@ -c -I. $<
git-commit:
git add *.h *.cc >> .local.git.out
git commit -a -m "Commit Web Server" >> .local.git.out || echo
git push
clean:
rm -f *.o use-dlopen hello.so
rm -f *.o daytime-server daytime-client myhttpd