source: trunk/Makefile.am @ 1120

Last change on this file since 1120 was 1120, checked in by sam, 9 years ago

build: remove #if directives from remez.cpp when distributing LolRemez.

File size: 1.7 KB
Line 
1
2SUBDIRS = src test deushax monsterz tools gfx
3DIST_SUBDIRS = $(SUBDIRS)
4
5EXTRA_DIST = bootstrap build-linux build-mingw build-mingw64 build-ps3 \
6             build-nacl32 build-nacl64 build/lol-build
7AUTOMAKE_OPTIONS = dist-bzip2
8
9bench:
10        cd test && $(MAKE) $(AM_MAKEFLAGS) $@
11.PHONY: bench
12
13dist: lolunit-$(LOLUNIT_VERSION).tar.gz
14dist: lolremez-$(LOLREMEZ_VERSION).tar.gz
15
16.PHONY: lolunit-$(LOLUNIT_VERSION).tar.gz
17lolunit-$(LOLUNIT_VERSION).tar.gz:
18        rm -rf lolunit-$(LOLUNIT_VERSION)
19        mkdir lolunit-$(LOLUNIT_VERSION)
20        mkdir lolunit-$(LOLUNIT_VERSION)/lol
21        cp $(top_srcdir)/src/lol/unit.h lolunit-$(LOLUNIT_VERSION)/lol
22        tar cvzf lolunit-$(LOLUNIT_VERSION).tar.gz lolunit-$(LOLUNIT_VERSION)
23        rm -rf lolunit-$(LOLUNIT_VERSION)
24
25.PHONY: lolremez-$(LOLREMEZ_VERSION).tar.gz
26lolremez-$(LOLREMEZ_VERSION).tar.gz:
27        rm -rf lolremez-$(LOLREMEZ_VERSION)
28        mkdir lolremez-$(LOLREMEZ_VERSION)
29        mkdir lolremez-$(LOLREMEZ_VERSION)/lol
30        mkdir lolremez-$(LOLREMEZ_VERSION)/lol/math
31        cat $(top_srcdir)/test/math/remez.cpp | sed '/#if/,/^$$/d' > \
32          lolremez-$(LOLREMEZ_VERSION)/remez.cpp
33        cat $(top_srcdir)/src/real.cpp | sed 's@core.h@lol/math/real.h@' | sed '/#if/,/^$$/d' > \
34          lolremez-$(LOLREMEZ_VERSION)/real.cpp
35        cp $(top_srcdir)/src/lol/math/real.h \
36           $(top_srcdir)/src/lol/math/matrix.h \
37           $(top_srcdir)/src/lol/math/remez.h \
38          lolremez-$(LOLREMEZ_VERSION)/lol/math
39        printf 'remez: real.cpp remez.cpp\n' > lolremez-$(LOLREMEZ_VERSION)/Makefile
40        printf '\t$$(CXX) -I. -O2 -g -ggdb $$^ -o $$@\n' >> lolremez-$(LOLREMEZ_VERSION)/Makefile
41        printf 'clean:\n' >> lolremez-$(LOLREMEZ_VERSION)/Makefile
42        printf '\trm -f remez\n' >> lolremez-$(LOLREMEZ_VERSION)/Makefile
43        tar cvzf lolremez-$(LOLREMEZ_VERSION).tar.gz lolremez-$(LOLREMEZ_VERSION)
44        rm -rf lolremez-$(LOLREMEZ_VERSION)
45
Note: See TracBrowser for help on using the repository browser.