PageRenderTime 132ms CodeModel.GetById 128ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Makefile

http://github.com/chengchangwu/jonesforth
Makefile | 50 lines | 31 code | 15 blank | 4 comment | 0 complexity | bd1c4fb4bfd02994e14278c7aed04c48 MD5 | raw file
 1# $Id: Makefile,v 1.9 2007-10-22 18:53:12 rich Exp $
 2
 3#BUILD_ID_NONE := -Wl,--build-id=none 
 4BUILD_ID_NONE := 
 5
 6SHELL	:= /bin/bash
 7
 8all:	jonesforth
 9
10jonesforth: jonesforth.S
11	gcc -m32 -nostdlib -static -Wl,-Ttext,0 $(BUILD_ID_NONE) -o $@ $<
12
13run:
14	cat jonesforth.f $(PROG) - | ./jonesforth
15
16clean:
17	rm -f jonesforth perf_dupdrop *~ core .test_*
18
19# Tests.
20
21TESTS	:= $(patsubst %.f,%.test,$(wildcard test_*.f))
22
23test check: $(TESTS)
24
25test_%.test: test_%.f jonesforth
26	@echo -n "$< ... "
27	@rm -f .$@
28	@cat <(echo ': TEST-MODE ;') jonesforth.f $< <(echo 'TEST') | \
29	  ./jonesforth 2>&1 | \
30	  sed 's/DSP=[0-9]*//g' > .$@
31	@diff -u .$@ $<.out
32	@rm -f .$@
33	@echo "ok"
34
35# Performance.
36
37perf_dupdrop: perf_dupdrop.c
38	gcc -O3 -Wall -Werror -o $@ $<
39
40run_perf_dupdrop: jonesforth
41	cat <(echo ': TEST-MODE ;') jonesforth.f perf_dupdrop.f | ./jonesforth
42
43.SUFFIXES: .f .test
44.PHONY: test check run run_perf_dupdrop
45
46remote:
47	scp jonesforth.S jonesforth.f rjones@oirase:Desktop/
48	ssh rjones@oirase sh -c '"rm -f Desktop/jonesforth; \
49	  gcc -m32 -nostdlib -static -Wl,-Ttext,0 -o Desktop/jonesforth Desktop/jonesforth.S; \
50	  cat Desktop/jonesforth.f - | Desktop/jonesforth arg1 arg2 arg3"'