File: Makefile

package info (click to toggle)
tmperamental 1.6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 84 kB
  • sloc: ansic: 157; makefile: 57; sh: 20
file content (30 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (3)
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
c_files = $(wildcard *.c)
ok_files = $(addprefix out/,$(c_files:.c=.ok32) $(c_files:.c=.ok64))

preload = LD_PRELOAD=../out/libtmperamental.so
assert_aborted = [ $$? -eq 134 ]

.PHONY: all
all: $(ok_files)

%.ok32: %.exe32
	$(preload) $<; $(assert_aborted)
	touch $@

%.ok64: %.exe64
	$(preload) $<; $(assert_aborted)
	touch $@

out/%.exe32: %.c
	mkdir -p out
	$(CC) $(CFLAGS) $(CPPFLAGS) -U_FILE_OFFSET_BITS -Wall -o $@ $<

out/%.exe64: %.c
	mkdir -p out
	$(CC) $(CFLAGS) $(CPPFLAGS) -D_FILE_OFFSET_BITS=64 -Wall -o $@ $<

.PHONY: clean
clean:
	rm -rf out

.PRECIOUS: out/%.exe32 out/%.exe64