-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
48 lines (34 loc) · 1.41 KB
/
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
46
47
48
include ../Makefile.inc
GEN_EXE = catch_rtsigs demo_SIGFPE ignore_pending_sig intquit \
nonreentrant ouch sig_receiver sig_sender sig_speed_sigsuspend \
sigmask_longjmp sigmask_siglongjmp \
t_kill t_sigaltstack t_sigsuspend t_sigqueue t_sigwaitinfo
LINUX_EXE = signalfd_sigval
EXE = ${GEN_EXE} ${LINUX_EXE}
all : ${EXE}
allgen : ${GEN_EXE}
#
# The following example programs make use of signal() (instead of the
# preferred sigaction()) to establish signal handlers.
# By default, signal() on Linux follows the BSD semantics, establishing
# a reliable signal handler. This is because _BSD_SOURCE is enabled
# bt default in <features.h>. However, in ../Makefile.inc, we define
# CFLAGS to include _XOPEN_SOURCE, and this has the effect of disabling
# _BSD_SOURCE. To ensure that we get the default (BSD) semantics
# we here explicitly define _BSD_SOURCE when compiling these programs.
#
ouch : ouch.c
${CC} -D_BSD_SOURCE -o $@ ouch.c ${CFLAGS} ${LDLIBS}
intquit : intquit.c
${CC} -D_BSD_SOURCE -o $@ intquit.c ${CFLAGS} ${LDLIBS}
sig_receiver : sig_receiver.c
${CC} -D_BSD_SOURCE -o $@ sig_receiver.c ${CFLAGS} ${LDLIBS}
nonreentrant : nonreentrant.o
${CC} -o $@ nonreentrant.o ${CFLAGS} ${LDLIBS} ${LINUX_LIBCRYPT}
sigmask_siglongjmp.o : sigmask_longjmp.c
${CC} -o $@ -DUSE_SIGSETJMP -c sigmask_longjmp.c ${CFLAGS}
clean :
${RM} ${EXE} *.o
showall :
@ echo ${EXE}
${EXE} : ${LPLIB} # True as a rough approximation