File: Makefile.am

package info (click to toggle)
polyml 5.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 19,692 kB
  • ctags: 17,567
  • sloc: cpp: 37,221; sh: 9,591; asm: 4,120; ansic: 428; makefile: 203; ml: 191; awk: 91; sed: 10
file content (84 lines) | stat: -rw-r--r-- 1,863 bytes parent folder | download | duplicates (2)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
AUTOMAKE_OPTIONS=foreign

AM_CPPFLAGS = $(ARCHFLAG) $(OSFLAG) -Wall
AM_CFLAGS = $(ARCHFLAG) $(OSFLAG) -Wall -fno-strict-aliasing

POLYIMPORT_OPTIONS = -H 10
BOOTSTRAP_OPTIONS = -H 10

SUBDIRS = libpolyml libpolymain

bin_PROGRAMS = polyimport poly

man_MANS = poly.1 polyimport.1

# Select the architecture-specific modules
if ARCHI386
POLYIMPORT = imports/polymli386.txt
else
if ARCHPPC
POLYIMPORT = imports/polymlppc.txt
else
if ARCHSPARC
POLYIMPORT = imports/polymlsparc.txt
else
if ARCHINTERPRET
POLYIMPORT = imports/polymlint.txt
else
if ARCHINTERPRET64
POLYIMPORT = imports/polymlint64.txt
else
if ARCHX86_64
POLYIMPORT = imports/polymlx86_64.txt
else
endif
endif
endif
endif
endif
endif

poly_LDFLAGS=
polyimport_LDFLAGS=
POLYRESOURCES=

if NATIVE_WINDOWS
poly_LDFLAGS += -mwindows -Wl,-u,_WinMain@16
polyimport_LDFLAGS += -mwindows
POLYOBJECTFILE = polyexport.obj
POLYRESOURCES += polyresource.o
else
POLYOBJECTFILE = polyexport.o
endif

poly_SOURCES = 
poly_LDADD = $(POLYOBJECTFILE) $(POLYRESOURCES) libpolymain/libpolymain.la libpolyml/libpolyml.la 

polyimport_SOURCES = polyimport.c
polyimport_LDADD = $(POLYRESOURCES) libpolyml/libpolyml.la

#
polyexport.o: polyimport exportPoly.sml polytemp.txt
	./polyimport $(POLYIMPORT_OPTIONS) polytemp.txt < exportPoly.sml > /dev/null

polyexport.obj: polyimport exportPoly.sml polytemp.txt
	./polyimport $(POLYIMPORT_OPTIONS) polytemp.txt < exportPoly.sml > /dev/null

polyresource.o: PolyML.rc poly.ico
	windres -o polyresource.o PolyML.rc

polytemp.txt: $(POLYIMPORT)
	cp $(POLYIMPORT) polytemp.txt

# This builds the compiler but does not update the files in the imports directory.
# It then builds a version of poly containing the new compiler.
cvs: all
	./poly $(BOOTSTRAP_OPTIONS) < mlsource/BuildExport.sml
	$(MAKE)

reboot: cvs
	cp polytemp.txt $(POLYIMPORT)

clean-local:
	rm -f *.obj polytemp.txt