File: Makefile

package info (click to toggle)
libdontdie 1.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 132 kB
  • sloc: ansic: 371; java: 45; makefile: 24; sh: 12
file content (32 lines) | stat: -rw-r--r-- 865 bytes parent folder | download | duplicates (2)
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
CC=gcc
CFLAGS+=-fpic -Wall -Wextra -O3 ${CPPFLAGS}
LDFLAGS+=-shared -Wl,-soname,libdontdie.so.0

all: libdontdie.so libdontdie.so.0

testapps: test/Cperformance/perf test/java/EchoClient.class \
	test/Cblackbox/tcp_server test/Cblackbox/tcp_client


libdontdie.so.0:
	ln -s libdontdie.so libdontdie.so.0

libdontdie.so: src/libdontdie.c
	${CC} ${CFLAGS} -o $@ $< ${LDFLAGS} -ldl

test/Cblackbox/tcp_server: test/Cblackbox/tcp_server.c
	${CC} ${CFLAGS} -o $@ $<

test/Cblackbox/tcp_client: test/Cblackbox/tcp_client.c
	${CC} ${CFLAGS} -o $@ $<

test/Cperformance/perf: test/Cperformance/perf.c
	${CC} ${CFLAGS} -o $@ $<

test/java/EchoClient.class: test/java/EchoClient.java
	(cd test/java; javac EchoClient.java)

.PHONY: clean
clean:
	rm -f libdontdie.so* test/Cperformance/perf test/java/EchoClient.class \
	   test/Cblackbox/tcp_server test/Cblackbox/tcp_client