-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
23 lines (19 loc) · 662 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
dest_directory = /opt/mws/
program_name = mini-web-server
small_program = mws
all:
gcc cJSON.c server-evhttp.c -o $(program_name) -levent
small:
gcc cJSON.c server.c -o $(small_program) -levent
install:
gcc cJSON.c server-evhttp.c -o $(program_name) -levent
gcc cJSON.c server.c -o $(small_program) -levent
test -d $(dest_directory) || mkdir -p $(dest_directory) && cp -R . $(dest_directory)
ln -sf $(dest_directory)$(program_name) /usr/bin/$(program_name)
ln -sf $(dest_directory)$(small_program) /usr/bin/$(small_program)
rm mini-web-server
rm mws
remove:
rm -Rf $(dest_directory)
rm -f /usr/bin/$(program_name)
rm -f /usr/bin/$(small_program)