5 ifeq "$(shell uname)" "Darwin"
6 PLATFORM_FLAGS
= -DMAC_OSX
7 # Try "homebrew" first when finding the Boehm GC...
8 PLATFORM_FLAGS
+= -I
/usr
/local
/include -L
/usr
/local
/lib
9 # Otherwise try Fink...
10 PLATFORM_FLAGS
+= -I
/opt
/local
/include -L
/opt
/local
/lib
11 # Use this if you're using Fink:
12 # PLATFORM_FLAGS += -DOSX_FINK -I/sw/include -L/sw/lib
18 $(CC
) -o trylon .c-sources
/*.c
-lgc
-lm
$(PLATFORM_FLAGS
)
20 .PHONY
: install clean tests syntax-test fix-bugs-test x86-compiler-test
23 install -d
$(PREFIX
)/bin
24 install -d
$(PREFIX
)/lib
25 install trylon
$(PREFIX
)/bin
26 install trylon-interpreter
$(PREFIX
)/bin
27 cp
-r library
$(PREFIX
)/lib
/trylon
31 .c-sources .objects .c-sources-2 .objects-2
33 tests
: syntax-test standard-library-test fixed-bugs-test x86-compiler-test
36 cd tests
/syntax
&& rm -f syntax-test
&& make
&& trylon main
&& echo
38 standard-library-test
:
39 cd tests
/standard-library
&& rm -f test-standard-library .objects
/* && make
&& echo
42 cd tests
/fixed-bugs
&& rm -f test-fixed-bugs .objects
/* && make
&& echo
45 cd sources
/X86Compiler
/test && make
50 TARBALL_FILES
:= sources makefile ReadMe License tarball-date version
51 TARBALL_FILES
+= library
/Trylon_.h library
/Trylon_.c library
/build-settings
52 TARBALL_FILES
+= library
/Standard library
/Posix
53 TARBALL_FILES
+= library
/Cairo library
/Xlib library
/Xft library
/Readline
54 TARBALL_FILES
+= docs
/source docs
/html docs
/makefile
55 TARBALL_FILES
+= docs
/doctifier
/build-settings docs
/doctifier
/sources
56 TARBALL_FILES
+= tests
57 TARBALL_FILES
+= build-settings .c-sources
58 TARBALL_FILES
+= trylon-interpreter
60 TRYLON_DIR
:= $(notdir $(PWD
))
61 TARBALL_FILES
:= $(addprefix $(TRYLON_DIR
)/,$(TARBALL_FILES
))
64 date
"+%Y.%m.%d %k:%M %z" > tarball-date
65 cd ..
&& tar --create
--gzip
--file
=$(TRYLON_DIR
)/trylon.tgz \