summaryrefslogtreecommitdiffstats
path: root/hw4/Makefile.am
blob: 32fa2258529fa8cbaa80edfd633b41f6fe9c9ee0 (plain) (blame)
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
EXTRA_DIST =
NULL =

bin_PROGRAMS = cgish-httpd
noinst_LIBRARIES = libl4basic.a

cgidir = $(datadir)/$(PACKAGE)
cgi_PROGRAMS = file_reader server_info
cgi_SCRIPTS = cgiprog/kill_myself

libl4basic_a_SOURCES = \
    l4basic/memwrap.h   \
    l4basic/memwrap.c   \
    l4basic/l4common.h  \
    l4basic/l4array.h   \
    l4basic/l4array.c   \
    l4basic/l4strv.h   \
    l4basic/l4strv.c   \
    l4basic/l4list.h    \
    l4basic/l4list.c    \
    l4basic/l4str.h     \
    l4basic/l4str.c     \
    l4basic/l4posix.h   \
    l4basic/l4posix.c   \
    $(NULL)
libl4basic_a_CFLAGS = -pthread -I$(top_srcdir)/l4basic
libl4basic_a_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700

cgish_httpd_SOURCES = \
    chttpd/chttpd-log.h      \
    chttpd/chttpd-log.c      \
    chttpd/chttpd-socket.h   \
    chttpd/chttpd-socket.c   \
    chttpd/chttpd-server.h   \
    chttpd/chttpd-server.c   \
    chttpd/chttpd-conn.h     \
    chttpd/chttpd-conn.c     \
    $(NULL)
cgish_httpd_CFLAGS = -pthread -I$(top_srcdir)/l4basic -I$(top_srcdir)/chttpd
cgish_httpd_LDADD = $(top_builddir)/libl4basic.a

file_reader_SOURCES = cgiprog/file_reader.c
server_info_SOURCES = cgiprog/server_info.c

# Workaround for automake (executable cannot named after `info')
MY_V_LN = $(MY_V_LN_@AM_V@)
MY_V_LN_ = $(MY_V_LN_@AM_DEFAULT_V@)
MY_V_LN_0 = @echo "  LN      " $@;

all-local: $(abs_top_builddir)/info $(abs_top_builddir)/kill_myself
$(abs_top_builddir)/info: $(top_builddir)/server_info
    $(MY_V_LN)ln -s server_info $(abs_top_builddir)/info
$(abs_top_builddir)/kill_myself: $(top_srcdir)/cgiprog/kill_myself
    $(MY_V_LN)ln -s $(top_srcdir)/cgiprog/kill_myself $(abs_top_builddir)/kill_myself
CLEANFILES = $(abs_top_builddir)/info $(abs_top_builddir)/kill_myself