File: Makefile

package info (click to toggle)
libfiu 1.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 768 kB
  • sloc: ansic: 2,633; python: 973; makefile: 599; sh: 309
file content (50 lines) | stat: -rw-r--r-- 770 bytes parent folder | download | duplicates (5)
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

ifneq ($(V), 1)
	NICE_RUN = @echo "  RUN $<"; LD_LIBRARY_PATH=../../libfiu/
	NICE_LN = @echo "  LN $@"; ln -f
else
	NICE_RUN = LD_LIBRARY_PATH=../../libfiu/
	NICE_LN = ln -f
endif


default: all

all: tests


# Link the libraries to a single place, as the scripts expect.
libs:
	mkdir -p libs/

libs/fiu_posix_preload.so: ../../preload/posix/fiu_posix_preload.so libs
	$(NICE_LN) $< libs/

libs/fiu_run_preload.so: ../../preload/run/fiu_run_preload.so libs
	$(NICE_LN) $< libs/

lnlibs: libs/fiu_posix_preload.so libs/fiu_run_preload.so


#
# Tests
#

SRCS := $(wildcard test-*)

tests: $(patsubst %,run-%,$(SRCS))

run-%: % lnlibs
	$(NICE_RUN) ./$< > output-$<.txt 2>&1


#
# Cleanup
#

clean:
	rm -f libs/*.so output-*.txt

.PHONY: default all clean \
	tests lnlibs