1## Process this file with automake to produce Makefile.in
2
3# Makefile for the dcethreads library and tools
4include $(top_srcdir)/include.mk
5
6noinst_LTLIBRARIES = libdcethread.la
7
8COMMON_FILES = \
9	dcethread_create.c \
10	dcethread_join.c \
11	dcethread_detach.c \
12	dcethread_interrupt.c \
13	dcethread_pause.c \
14	dcethread_cond_wait.c \
15	dcethread_atfork.c \
16	dcethread_kill.c \
17	dcethread_exit.c \
18	dcethread_read.c \
19	dcethread_write.c \
20	dcethread_send.c \
21	dcethread_sendto.c \
22	dcethread_sendmsg.c \
23	dcethread_recv.c \
24	dcethread_recvfrom.c \
25	dcethread_recvmsg.c \
26	dcethread_select.c \
27	dcethread_checkinterrupt.c
28
29
30TEST_FILES = $(COMMON_FILES) dcethread-test.c test-exception.c
31API_FILES = $(COMMON_FILES) \
32	dcethread-private.c dcethread-debug.c dcethread-util.c dcethread-exception.c \
33	dcethread_get_expiration.c \
34	dcethread_delay.c \
35	dcethread_lock_global.c \
36	dcethread_unlock_global.c \
37	dcethread_ismultithreaded.c \
38	dcethread_mutexattr_getkind.c \
39	dcethread_mutexattr_setkind.c \
40	dcethread_signal_to_interrupt.c \
41	dcethread_attr_create.c \
42	dcethread_attr_delete.c \
43	dcethread_attr_setprio.c \
44	dcethread_attr_getprio.c \
45	dcethread_attr_setsched.c \
46	dcethread_attr_getsched.c \
47	dcethread_attr_setinheritsched.c \
48	dcethread_attr_getinheritsched.c \
49	dcethread_attr_setstacksize.c \
50	dcethread_attr_getstacksize.c \
51	dcethread_setprio.c \
52	dcethread_getprio.c \
53	dcethread_mutexattr_create.c \
54	dcethread_mutexattr_delete.c \
55	dcethread_mutex_init.c \
56	dcethread_mutex_destroy.c \
57	dcethread_mutex_lock.c \
58	dcethread_mutex_unlock.c \
59	dcethread_mutex_trylock.c \
60	dcethread_condattr_create.c \
61	dcethread_condattr_delete.c \
62	dcethread_cond_init.c \
63	dcethread_cond_destroy.c \
64	dcethread_cond_broadcast.c \
65	dcethread_cond_signal.c \
66	dcethread_cond_timedwait.c \
67	dcethread_once.c \
68	dcethread_keycreate.c \
69	dcethread_setspecific.c \
70	dcethread_getspecific.c \
71	dcethread_enableasync.c \
72	dcethread_enableinterrupt.c \
73	dcethread_yield.c \
74	dcethread_equal.c \
75	dcethread_self.c \
76	dcethread_exc_init.c \
77	dcethread_exc_setstatus.c \
78	dcethread_exc_getstatus.c \
79	dcethread_exc_matches.c \
80	dcethread_exc_raise.c \
81	dcethread_frame_push.c \
82	dcethread_frame_pop.c
83
84libdcethread_la_SOURCES = $(API_FILES)
85libdcethread_la_LIBADD = @LIB_pthread@ @LIB_rt@
86libdcethread_la_LDFLAGS = -version-info 1:0:0
87libdcethread_la_CPPFLAGS = -DAPI $(AM_CPPFLAGS)
88
89if TARGET_OS_DARWIN
90libdcethread_la_LDFLAGS += -no-undefined
91endif
92
93if HAVE_MOONUNIT
94lib_LTLIBRARIES = dcethread_mu.la
95dcethread_mu_la_SOURCES = $(TEST_FILES) test_stub.c
96dcethread_mu_la_LIBADD = libdcethread.la $(LIB_moonunit)
97dcethread_mu_la_LDFLAGS = -module -avoid-version -export-dynamic
98dcethread_mu_la_CPPFLAGS = -DTEST $(AM_CPPFLAGS)
99dcethread_mu_la_CFLAGS = -Wall -Werror
100
101BUILT_SOURCES = test_stub.c
102
103EXTRA_DIST = dcethread-private.h dcethread-debug.h dcethread-util.h
104
105test_stub.c: $(TEST_FILES)
106	$(MOONUNIT_STUB) -o $@ CPP="$(CPP)" CPPFLAGS="$(CPPFLAGS) $(AM_CPPFLAGS) -DTEST" $^
107endif
108