test-autotools-shared/Makefile.am

35 lines
991 B
Makefile
Raw Normal View History

2015-01-31 20:37:04 +01:00
AM_CFLAGS = # CFLAGS applicable to all executables (products)
2015-06-23 19:17:24 +02:00
AM_CPPFLAGS = -I$(top_srcdir)/src # so that tests also find header files
2015-01-31 20:37:04 +01:00
2015-06-23 19:17:24 +02:00
# Convenience library so that it can be resued
2015-02-09 22:21:18 +01:00
# between my_executable and the tests
noinst_LIBRARIES = libcommon.a
2015-02-09 22:35:26 +01:00
libcommon_a_SOURCES = src/common.h src/common.c
# src/common.h appear in SOURCES to that it gets copied to
# distribution tgz.
2015-02-09 22:21:18 +01:00
2015-06-23 19:17:24 +02:00
# The main product
bin_PROGRAMS = myexecutable # make all will generate ./my_executable
#include .c and .h in SOURCES so that both appear in dist
2015-01-28 23:05:38 +01:00
myexecutable_SOURCES = \
2015-06-23 19:17:24 +02:00
src/add.c \
src/add.h \
2015-01-28 23:05:38 +01:00
src/main.c
myexecutable_CFLAGS = $(AM_CFLAGS) #--std=c11 # CFLAGS applicable to myexecutable_SOURCES
2015-02-09 22:21:18 +01:00
myexecutable_LDADD = libcommon.a
2015-02-06 17:10:11 +01:00
# Tests
# 'check' comes from 'make check'
2015-02-07 21:02:22 +01:00
2015-06-23 19:17:24 +02:00
check_PROGRAMS = add.ctaptest
TESTS = add.ctaptest
2015-02-06 20:25:03 +01:00
2015-06-23 19:17:24 +02:00
add_ctaptest_SOURCES = tests/add.c src/add.c src/add.h
add_ctaptest_CPPFLAGS = $(AM_CPPFLAGS) # so that tests find the header files
2015-02-07 21:02:22 +01:00
2015-02-06 17:10:11 +01:00