Makefile.am 2.55 KB
Newer Older
Ban's avatar
Ban committed
1
lib_LTLIBRARIES = libovcc.la
Ban's avatar
Ban committed
2
noinst_PROGRAMS = test
Ban's avatar
Ban committed
3

4 5 6 7

EXTRA_DIST = hack.h hack.vapi \
             ovcc.h ovcc.vapi

8
libovcc_la_CPPFLAGS  = -DG_LOG_DOMAIN=\"LibOVCC\"
9 10
libovcc_la_CFLAGS    = $(LIBOVCC_CFLAGS) \
                      -DDATADIR='"$(pkgdatadir)"'
11
libovcc_la_LIBADD    = $(LIBOVCC_LIBS)
12
libovcc_la_VALAFLAGS = $(LIBOVCC_VALAFLAGS) --library=ovcc --header=ovcc.h \
13
                       --vapidir=. --pkg=hack
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
libovcc_la_SOURCES   = ovcc-board.vala \
                       ovcc-game.vala \
                       ovcc-pawn.vala \
                       ovcc-player.vala \
                       ovcc-sig-queue.vala \
                       ovcc-stack.vala \
                       ovcc-tile.vala \
                       ovcc-tile-object.vala \
                       ovcc-tile-set.vala \
                       ovcc-tiles-def.vala \
                       ovcc-utils.vala \
                       network/ovcc-network-message.vala \
                       network/ovcc-network-empty-message.vala \
                       network/ovcc-network-string-message.vala \
                       network/ovcc-network-variant-message.vala \
                       network/ovcc-network-login-message.vala \
30 31
                       network/ovcc-network-join-message.vala \
                       network/ovcc-network-gamedata-message.vala \
32 33 34 35 36 37
                       network/ovcc-network-signals.vala \
                       network/ovcc-network-disconnect-message.vala \
                       network/ovcc-network-welcome-message.vala \
                       network/ovcc-network-error-message.vala
ovccinclude_HEADERS  = ovcc.h
vapi_DATA            = ovcc.vapi
Ban's avatar
Ban committed
38

39 40
test_CFLAGS  = $(LIBOVCC_CFLAGS)
test_LDADD   = $(LIBOVCC_LIBS) libovcc.la -lpthread
Ban's avatar
Ban committed
41
test_SOURCES = test.c
42 43


44
$(lib_LTLIBRARIES): stamp-hack
45

46
# FIXME: how to force re-generation of ovcc.h and ovcc.vapi if they got removed?
47
stamp-hack: ovcc.h ovcc.vapi
48
	(f=`mktemp $@.XXXXXXXXXX`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
49
	 ovcc_h=ovcc.h; [ -f "$$ovcc_h" ] || ovcc_h="$(srcdir)/$$ovcc_h"; \
50
	 cat $(srcdir)/hack.h "$$ovcc_h" | sed '/<hack.h>/d'> "$$f" && \
51
	 (echo "/* this file is auto-generated, do not modify it (XXX: generated by valac) */" && \
52
	  cat "$$f") > ovcc.h)
53
	(f=`mktemp $@.XXXXXXXXXX`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
54 55
	 ovcc_vapi=ovcc.vapi; [ -f "$$ovcc_vapi" ] || ovcc_vapi="$(srcdir)/$$ovcc_vapi"; \
	 cat $(srcdir)/hack.vapi "$$ovcc_vapi" | sed 's~"\(hack\|ovcc\).h"~"ovcc/ovcc.h"~g' > "$$f" && \
56
	 (echo "/* this file is auto-generated, do not modify it (XXX: generated by valac) */" && \
57 58
	  cat "$$f") > ovcc.vapi)
	touch $@