-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.mk
72 lines (55 loc) · 1.89 KB
/
rules.mk
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Copyright (c) 2021 Christopher White. All rights reserved.
# SPDX-License-Identifier: MIT
# common rules
# for convenience at the ends of lists
EOL =
# A convenient place to hold phony targets
.PHONY: $(phony)
phony =
# === Locations =========================================================
# From https://tecnocode.co.uk/2013/12/14/notes-on-vala-and-automake/
vapidir = $(datadir)/vala/vapi
# === Variables =========================================================
vala_all_sources = \
$(top_srcdir)/src/basics.vapi \
$(top_srcdir)/src/marshal.vala \
$(top_srcdir)/src/trampoline.vala \
$(top_srcdir)/src/util.vala \
$(top_srcdir)/src/vm.vala \
$(EOL)
c_all_sources = \
$(top_srcdir)/src/myconfig.c \
$(top_srcdir)/src/shim.c \
$(EOL)
# Vala settings.
# - LOCAL_VALA_FLAGS is filled in by each Makefile.am with any other valac
# options that Makefile.am needs.
# - TODO remove USER_VALAFLAGS once I figure out why regular VALAFLAGS
# isn't being passed through.
AM_VALAFLAGS = \
$(LOCAL_VALA_FLAGS) \
$(MY_VALA_PKGS) \
$(USER_VALAFLAGS) \
$(EOL)
MY_VALA_PKGS = \
--pkg gobject-2.0 \
--pkg gio-2.0 \
$(EOL)
# C settings, which are the same throughout. LOCAL_CFLAGS is filled in
# by each Makefile.am.
AM_CFLAGS = \
-I$(top_srcdir)/wren-pkg -I$(top_builddir)/wren-pkg \
$(LOCAL_CFLAGS) $(BASE_CFLAGS) \
$(CODE_COVERAGE_CFLAGS) \
$(EOL)
AM_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
# Libs. $(LOCAL_LIBS) is added to $(LIBS) in configure.ac.
LOCAL_LIBS = $(BASE_LIBS) $(CODE_COVERAGE_LIBS)
# === Code coverage =====================================================
# For code coverage, per
# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html
clean-local: code-coverage-clean
distclean-local: code-coverage-dist-clean
CODE_COVERAGE_OUTPUT_FILE = $(PACKAGE_TARNAME)-coverage.info
CODE_COVERAGE_OUTPUT_DIRECTORY = $(PACKAGE_TARNAME)-coverage
include $(top_srcdir)/aminclude_static.am