Makefile.am 1.85 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 8 9 10 11

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

libovcc_la_CPPFLAGS = -DG_LOG_DOMAIN=\"LibOVCC\"
libovcc_la_VALAFLAGS = $(VALAFLAGS) --library=ovcc --header=ovcc.h \
                       --vapidir=. --pkg=hack
libovcc_la_SOURCES  = board.vala \
12
                      game.vala \
13 14
                      pawn.vala \
                      player.vala \
Colomban Wendling's avatar
Colomban Wendling committed
15
                      stack.vala \
16
                      tile.vala \
17
                      tileobject.vala \
Colomban Wendling's avatar
Colomban Wendling committed
18
                      tileset.vala \
19
                      tilesdef.vala \
20 21 22 23
                      utils.vala \
                      ovccnetworkmessage.vala \
                      ovccnetworkemptymessage.vala \
                      ovccnetworkstringmessage.vala \
24
                      ovccnetworkloginmessage.vala \
25 26 27
                      ovccnetworkdisconnectmessage.vala \
                      ovccnetworkwelcomemessage.vala \
                      ovccnetworkerrormessage.vala
28
ovccinclude_HEADERS = ovcc.h
29
vapi_DATA           = ovcc.vapi
Ban's avatar
Ban committed
30 31 32

test_LDADD   = libovcc.la -lpthread
test_SOURCES = test.c
33 34


35
$(lib_LTLIBRARIES): stamp-hack
36

37
# FIXME: how to force re-generation of ovcc.h and ovcc.vapi if they got removed?
38
stamp-hack: ovcc.h ovcc.vapi
39
	(f=`tempfile`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
40
	 ovcc_h=ovcc.h; [ -f "$$ovcc_h" ] || ovcc_h="$(srcdir)/$$ovcc_h"; \
41
	 cat $(srcdir)/hack.h "$$ovcc_h" | sed '/<hack.h>/d'> "$$f" && \
42 43 44
	 (echo "/* this file is auto-generated, do not modify it */" && \
	  cat "$$f") > ovcc.h)
	(f=`tempfile`; trap -- "rm -f '$$f'" EXIT QUIT TERM; \
45 46
	 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" && \
47 48 49
	 (echo "/* this file is auto-generated, do not modify it */" && \
	  cat "$$f") > ovcc.vapi)
	touch $@