forked from dailker/everyutil-c
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.am
More file actions
23 lines (17 loc) · 737 Bytes
/
Makefile.am
File metadata and controls
23 lines (17 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = -fPIC -DEVERYUTIL_BUILD -Wall -O2 $(shell find include -type d -name "*" -exec echo -I{} \;)
AM_LDFLAGS = -lm
lib_LTLIBRARIES = libeveryutil.la
libeveryutil_la_SOURCES = $(shell find src -name '*.c')
libeveryutil_la_LDFLAGS = -shared
include_HEADERS = $(shell find include -name '*.h')
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = pkgconfig/everyutil.pc
TESTS = $(patsubst tests/%.c,build/testExecutables/%.exe,$(shell find tests -name '*.c'))
check_PROGRAMS = $(TESTS)
build/testExecutables/%.exe: build/%.test.o libeveryutil.la
@mkdir -p $(dir $@)
$(CC) $(AM_CFLAGS) $< -L. -leveryutil -o $@ $(AM_LDFLAGS)
build/%.test.o: tests/%.c
@mkdir -p $(dir $@)
$(CC) $(AM_CFLAGS) -c $< -o $@