Makefile.am 1.4 KB
Newer Older
1 2 3 4 5 6 7
testdir = @XENO_TEST_DIR@
test_PROGRAMS = smokey

CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC)

smokey_SOURCES = main.c

8
COBALT_SUBDIRS = 	\
9 10
	arith 		\
	bufp		\
11
	cpu-affinity	\
12
	iddp		\
13
	leaks		\
14
	net_packet_dgram\
15
	net_packet_raw	\
16 17
	net_udp		\
	net_common	\
18 19 20 21
	posix-clock	\
	posix-cond 	\
	posix-fork	\
	posix-mutex 	\
22
	posix-select 	\
23 24 25
	rtdm 		\
	sched-quota 	\
	sched-tp 	\
26
	setsched	\
27
	sigdebug	\
28
	timerfd		\
29
	tsc		\
30
	vdso-access 	\
31
	xddp
32

33 34 35
MERCURY_SUBDIRS =
LEFTOUT_SUBDIRS =

36 37
if CONFIG_XENO_LIBS_DLOPEN
COBALT_SUBDIRS += dlopen
38 39
else
LEFTOUT_SUBDIRS += dlopen
40 41
endif

42
DIST_SUBDIRS = $(COBALT_SUBDIRS) $(MERCURY_SUBDIRS) $(LEFTOUT_SUBDIRS)
43 44 45 46

if XENO_COBALT
wrappers = $(XENO_POSIX_WRAPPERS)
SUBDIRS = $(COBALT_SUBDIRS)
47
else
48
SUBDIRS = $(MERCURY_SUBDIRS)
49 50 51 52 53 54 55
wrappers =
endif

plugin_list = $(foreach plugin,$(SUBDIRS),$(plugin)/lib$(plugin).a)
# wrap-link.sh is confused by -whole-archive, so work around
# this by forcing undefined references to symbols we expect the
# plugins to export.
Philippe Gerum's avatar
Philippe Gerum committed
56 57
sym_prefix=@XENO_SYMBOL_PREFIX@
undef_list = $(foreach plugin,$(SUBDIRS),-u $(sym_prefix)smokey_plugin_$(subst -,_,$(plugin)))
58 59 60 61 62

smokey_CPPFLAGS = 			\
	$(XENO_USER_CFLAGS)		\
	-I$(top_srcdir)/include

63
smokey_LDFLAGS=$(wrappers) @XENO_AUTOINIT_LDFLAGS@ $(undef_list)
64 65 66 67 68

smokey_LDADD = 					\
	$(plugin_list)				\
	../../lib/smokey/libsmokey.la		\
	../../lib/copperplate/libcopperplate.la	\
69
	@XENO_CORE_LDADD@			\
70 71
	 @XENO_USER_LDADD@			\
	-lpthread -lrt