1## This is a boilerplate file for Google opensource projects. 2## To make it useful, replace <<TEXT>> with actual text for your project. 3## Also, look at comments with "## double hashes" to see if any are worth 4## uncommenting or modifying. 5 6## Process this file with automake to produce Makefile.in 7 8# Make sure that when we re-make ./configure, we get the macros we need 9ACLOCAL_AMFLAGS = -I m4 10 11# This is so we can #include <cmockery/foo> 12AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/cmockery 13 14cmockeryincludedir = $(includedir)/cmockery 15## The .h files you want to install (that is, .h files that people 16## who install this package can include in their own applications.) 17cmockeryinclude_HEADERS = src/cmockery/cmockery_override.h\ 18 src/cmockery/cmockery.h\ 19 src/cmockery/pbc.h 20 21docdir = $(prefix)/share/doc/$(PACKAGE) 22## This is for HTML and other documentation you want to install. 23## Add your documentation files (in doc/) in addition to these 24## top-level boilerplate files. Also add a TODO file if you have one. 25nodist_doc_DATA = AUTHORS COPYING ChangeLog doc/index.html doc/usage.md \ 26 doc/coverage.md 27 28if HAVE_PKG_CONFIG 29pkgconfigdir = $(prefix)/libdata/pkgconfig 30pkgconfig_DATA = @PACKAGE_NAME@.pc 31endif 32 33## The libraries (.so's) you want to install 34lib_LTLIBRARIES = 35 36## unittests you want to run when people type 'make check'. 37## TESTS is for binary unittests, check_SCRIPTS for script-based unittests. 38## TESTS_ENVIRONMENT sets environment variables for when you run unittest, 39## but it only seems to take effect for *binary* unittests (argh!) 40TESTS = 41check_SCRIPTS = 42noinst_SCRIPTS = 43 44 45## vvvv RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS 46 47lib_LTLIBRARIES += libcmockery.la 48libcmockery_la_SOURCES = src/cmockery/config.h\ 49 src/cmockery.c\ 50 src/cmockery/cmockery_override.h\ 51 src/cmockery/cmockery.h\ 52 src/cmockery/pbc.h 53libcmockery_la_CFLAGS = -I$(top_srcdir)/src/cmockery -DHAVE_CONFIG_H -Wall \ 54 -Werror 55 56noinst_PROGRAMS = calculator 57nodist_calculator_SOURCES = src/example/calculator.c src/cmockery/config.h 58calculator_CFLAGS = 59 60unit_test_CFLAGS = -I$(top_srcdir)/src/cmockery \ 61 -I$(top_srcdir)/src/example -DUNIT_TESTING=1 \ 62 -Wall -Werror -DHAVE_CONFIG_H 63 64noinst_PROGRAMS += calculator_test 65TESTS += calculator_test 66nodist_calculator_test_SOURCES = src/example/calculator_test.c \ 67 $(nodist_calculator_SOURCES) 68calculator_test_CFLAGS = $(unit_test_CFLAGS) 69calculator_test_LDADD = libcmockery.la 70 71noinst_PROGRAMS += allocate_module_test 72# Don't add this one, it returns a fail exit status, 73# which is expected. TESTS += allocate_module_test 74nodist_allocate_module_test_SOURCES = src/example/allocate_module_test.c \ 75 src/example/allocate_module.c 76allocate_module_test_CFLAGS = $(unit_test_CFLAGS) 77allocate_module_test_LDADD = libcmockery.la 78 79noinst_PROGRAMS += assert_macro_test 80TESTS += assert_macro_test 81nodist_assert_macro_test_SOURCES = src/example/assert_macro_test.c \ 82 src/example/assert_macro.c 83assert_macro_test_CFLAGS = $(unit_test_CFLAGS) 84assert_macro_test_LDADD = libcmockery.la 85 86noinst_PROGRAMS += customer_database_test 87TESTS += customer_database_test 88nodist_customer_database_test_SOURCES = src/example/customer_database_test.c \ 89 src/example/customer_database.c \ 90 src/example/database.h 91customer_database_test_CFLAGS = $(unit_test_CFLAGS) 92customer_database_test_LDADD = libcmockery.la 93 94noinst_PROGRAMS += key_value_test 95TESTS += key_value_test 96nodist_key_value_test_SOURCES = src/example/key_value_test.c \ 97 src/example/key_value.h \ 98 src/example/key_value.c 99key_value_test_CFLAGS = $(unit_test_CFLAGS) 100key_value_test_LDADD = libcmockery.la 101 102noinst_PROGRAMS += product_database_test 103TESTS += product_database_test 104product_database_testdir = src/example 105nodist_product_database_test_SOURCES = src/example/product_database_test.c \ 106 src/example/product_database.c \ 107 src/example/database.h 108product_database_test_CFLAGS = $(unit_test_CFLAGS) 109product_database_test_LDADD = libcmockery.la 110 111noinst_PROGRAMS += run_tests 112TESTS += run_tests 113nodist_run_tests_SOURCES = src/example/run_tests.c 114run_tests_CFLAGS = $(unit_test_CFLAGS) 115run_tests_LDADD = libcmockery.la 116 117noinst_PROGRAMS += realloc_test 118TESTS += realloc_test 119nodist_realloc_test_SOURCES = src/example/realloc_test.c 120realloc_test_CFLAGS = $(unit_test_CFLAGS) 121realloc_test_LDADD = libcmockery.la 122 123noinst_PROGRAMS += mem_test 124TESTS += mem_test 125nodist_mem_test_SOURCES = src/example/mem_test.c 126mem_test_CFLAGS = $(unit_test_CFLAGS) 127mem_test_LDADD = libcmockery.la 128 129## ^^^^ END OF RULES TO MAKE THE LIBRARIES, BINARIES, AND UNITTESTS 130 131 132## This should always include $(TESTS), but may also include other 133## binaries that you compile but don't want automatically installed. 134noinst_PROGRAMS += $(TESTS) 135 136rpm: dist-gzip packages/rpm.sh packages/rpm/rpm.spec 137 @cd packages && ./rpm.sh ${PACKAGE} ${VERSION} 138 139deb: dist-gzip packages/deb.sh packages/deb/* 140 @cd packages && ./deb.sh ${PACKAGE} ${VERSION} 141 142## If you're using libtool, add 'libtool' here. Also add this rule: 143libtool: $(LIBTOOL_DEPS) 144 $(SHELL) ./config.status --recheck 145EXTRA_DIST = autogen.sh README.md $(SCRIPTS) 146 147CLEANFILES = *.gcda *.gcno *_xunit.xml 148 149dist-hook: 150 cp $(top_srcdir)/Makefile.am.dist $(top_distdir)/Makefile.am 151