summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 921e6b7ffd5fa212d34a82330bb50b8ce0ffcc72 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# -*- Makefile -*-

AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_srcdir}/include
AM_CFLAGS   = ${regular_CFLAGS}
AM_CXXFLAGS = ${regular_CXXFLAGS}

lib_LTLIBRARIES  = libHX.la
if HAVE_DLFCN_H
lib_LTLIBRARIES += libHX_rtcheck.la
endif

libHX_la_SOURCES = deque.c dl.c format.c io.c map.c \
                   mc.c misc.c opt.c proc.c \
                   rand.c socket.c string.c time.c
libHX_la_LIBADD  = ${libdl_LIBS} -lm ${libpthread_LIBS} ${librt_LIBS}
libHX_la_LDFLAGS = -no-undefined -version-info 36:0:4
if WITH_GNU_LD
libHX_la_LDFLAGS += -Wl,--version-script=${srcdir}/libHX.map
endif
EXTRA_libHX_la_DEPENDENCIES = libHX.map

if MINGW32
libHX_la_SOURCES += ux-file.c ux-mmap.c
libHX_la_LIBADD += -lws2_32
endif

libHX_rtcheck_la_SOURCES = rtcheck.c
libHX_rtcheck_la_LIBADD  = ${libdl_LIBS}
libHX_rtcheck_la_LDFLAGS = -no-undefined -avoid-version -module
if WITH_GNU_LD
libHX_rtcheck_la_LDFLAGS += -Wl,--version-script=${srcdir}/libHX.map
endif

EXTRA_DIST = internal.h map_int.h libHX.map

check_PROGRAMS     = tc-compile tc-cast tc-deque tc-dir tc-format tc-io \
                     tc-list tc-list2 tc-map tc-memmem tc-misc tc-netio \
                     tc-option tc-proc tc-rand tc-realpath \
                     tc-shconfig tc-socket tc-strchr2 tc-string tc-strquote \
                     tc-switchuser tc-time
TESTS              = tc-format tc-strchr2 tc-strquote
tc_cast_CFLAGS     = ${AM_CFLAGS} -std=gnu99
tc_cast_LDADD      = libHX.la -lm
tc_compile_LDADD   = libHX.la
tc_dir_LDADD       = libHX.la
tc_format_LDADD    = libHX.la
tc_io_LDADD        = libHX.la
tc_list_LDADD      = libHX.la
tc_list2_LDADD     = libHX.la
tc_list2_CFLAGS    = ${AM_CFLAGS} -O2 -fstrict-aliasing
tc_map_LDADD       = libHX.la -lm
tc_memmem_LDADD    = libHX.la
tc_misc_LDADD      = libHX.la
tc_netio_LDADD     = libHX.la ${libsocket_LIBS}
tc_option_LDADD    = libHX.la
tc_proc_LDADD      = libHX.la
tc_rand_LDADD      = libHX.la
tc_realpath_LDADD  = libHX.la
tc_shconfig_LDADD  = libHX.la
tc_socket_LDADD    = libHX.la
tc_strchr2_LDADD   = libHX.la
tc_string_LDADD    = libHX.la
tc_strquote_LDADD  = libHX.la
tc_switchuser_LDADD = libHX.la
tc_time_LDADD      = libHX.la

if HAVE_CXX
check_PROGRAMS    += tx-compile tx-cast tx-deque tx-dir \
                     tx-intdiff tx-list tx-list2 \
                     tx-misc tx-netio \
                     tx-option tx-proc tx-rand tx-strchr2 tx-string \
                     tx-strquote tx-time
TESTS             += tx-strchr2 tx-strquote
tx_cast_SOURCES    = tx-cast.cpp
tx_cast_LDADD      = libHX.la -lm
tx_compile_SOURCES = tx-compile.cpp
tx_compile_LDADD   = libHX.la
tx_deque_SOURCES   = tx-deque.cpp
tx_dir_SOURCES     = tx-dir.cpp
tx_dir_LDADD       = libHX.la
tx_intdiff_SOURCES = tx-intdiff.cpp
tx_list_SOURCES    = tx-list.cpp
tx_list_LDADD      = libHX.la
tx_list2_SOURCES   = tx-list2.cpp
tx_list2_CXXFLAGS  = ${AM_CXXFLAGS} -O2 -fstrict-aliasing
tx_list2_LDADD     = libHX.la
tx_misc_SOURCES    = tx-misc.cpp
tx_misc_LDADD      = libHX.la
tx_netio_SOURCES   = tx-netio.cpp
tx_netio_LDADD     = libHX.la ${libsocket_LIBS}
tx_option_SOURCES  = tx-option.cpp
tx_option_LDADD    = libHX.la
tx_proc_SOURCES    = tx-proc.cpp
tx_proc_LDADD      = libHX.la
tx_rand_SOURCES    = tx-rand.cpp
tx_rand_LDADD      = libHX.la ${librt_LIBS}
tx_strchr2_SOURCES = tx-strchr2.cpp
tx_strchr2_LDADD   = libHX.la
tx_string_SOURCES  = tx-string.cpp
tx_string_LDADD    = libHX.la
tx_strquote_SOURCES = tx-strquote.cpp
tx_strquote_LDADD   = libHX.la
tx_time_SOURCES    = tx-time.cpp
tx_time_LDADD      = libHX.la ${librt_LIBS}
endif