File: Makefile.am

package info (click to toggle)
polyml 5.7.1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 40,616 kB
  • sloc: cpp: 44,142; ansic: 26,963; sh: 22,002; asm: 13,486; makefile: 602; exp: 525; python: 253; awk: 91
file content (151 lines) | stat: -rw-r--r-- 3,581 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
AUTOMAKE_OPTIONS=foreign
ACLOCAL_AMFLAGS= -I m4 --install

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

BOOTSTRAP_OPTIONS =

if INTINFISINT
POLYIMPORT_OPTIONS = --intIsIntInf
else
POLYIMPORT_OPTIONS =
endif

DIST_SUBDIRS = libpolyml libpolymain libffi modules

if INTERNAL_LIBFFI
SUBDIRS = libffi libpolyml libpolymain . modules
else
SUBDIRS = libpolyml libpolymain . modules
endif

bin_PROGRAMS = polyimport poly

dist_bin_SCRIPTS = polyc

man_MANS = poly.1 polyimport.1 polyc.1

# Select the architecture-specific pre-built compiler
if ARCHI386
POLYIMPORT = $(srcdir)/imports/polymli386.txt
else
if ARCHINTERPRET
POLYIMPORT = $(srcdir)/imports/polymlint.txt
else
if ARCHINTERPRET64
POLYIMPORT = $(srcdir)/imports/polymlint64.txt
else
if ARCHX86_64
if WINDOWS64CALLS
POLYIMPORT = $(srcdir)/imports/polymlx86_64win.txt
else
POLYIMPORT = $(srcdir)/imports/polymlx86_64sysv.txt
endif
else
endif
endif
endif
endif

noinst_HEADERS = polyexports.h

poly_LDFLAGS=
polyimport_LDFLAGS=
POLYRESOURCES=
EXTRALDFLAGS=

if NATIVE_WINDOWS
if ARCHINTERPRET64
EXTRALDFLAGS += -Wl,-u,WinMain
else
if ARCHX86_64
EXTRALDFLAGS += -Wl,-u,WinMain
else
EXTRALDFLAGS += -Wl,-u,_WinMain@16 -Wl,--large-address-aware
endif
endif

if WINDOWSGUI
EXTRALDFLAGS += -mwindows
polyimport_LDFLAGS += -mwindows
else
EXTRALDFLAGS += -mconsole
polyimport_LDFLAGS += -mconsole
endif

poly_LDFLAGS += $(EXTRALDFLAGS)

POLYOBJECTFILE = polyexport.obj
POLYRESOURCES += polyresource.o
OBJECTSUFFIX=obj
else
POLYOBJECTFILE = polyexport.o
OBJECTSUFFIX=o
endif

if EXPMACHO
poly_LDFLAGS += -Wl,-no_pie
endif

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

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

EXTRA_DIST = \
	imports/polymli386.txt \
	imports/polymlint64.txt \
	imports/polymlint.txt \
	imports/polymlx86_64.txt \
	libpolyml/x86asm.asm \
	exportPoly.sml \
	poly.1 \
	polyimport.1

dist-hook:
	find {basis,mlsource}/ -type d -exec mkdir $(distdir)/{} \;
	find {basis,mlsource}/ -type f -not -name .svn \
	    -exec cp -pf {} $(distdir)/{} \;



# Unix.
polyexport.o: polyimport exportPoly.sml polytemp.txt
	./polyimport $(POLYIMPORT_OPTIONS) polytemp.txt -I $(srcdir) < $(srcdir)/exportPoly.sml

# Windows.  When building on Windows make sure that we provide both stdin and stdout to suppress the GUI.
polyexport.obj: polyimport$(EXEEXT) exportPoly.sml polytemp.txt
	./polyimport $(POLYIMPORT_OPTIONS) polytemp.txt -I $(srcdir) < $(srcdir)/exportPoly.sml | cat

polyresource.o: PolyML.rc poly.ico
	$(WINDRES) -o polyresource.o $(srcdir)/PolyML.rc

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

#polyc: buildpolyc
#	./buildpolyc LINK=\"$(CC)\" BINDIR=\"$(bindir)\" LIBDIR=\"$(libdir)\" LIBS=\"$(LIBS)\" EXTRALDFLAGS=\"$(EXTRALDFLAGS)\" SUFFIX=\"$(OBJECTSUFFIX)\"

# 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.
compiler: all
	./poly $(BOOTSTRAP_OPTIONS) --error-exit < mlsource/BuildExport.sml
	$(MAKE)

reboot: compiler
	cp polytemp.txt $(POLYIMPORT)

# Retain this target for backwards compatibility.
cvs: compiler

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

# Run tests
check-local: all
	echo "val () = use \"$(srcdir)/Tests/RunTests\"; val () = OS.Process.exit(if runTests \"$(srcdir)/Tests\" then OS.Process.success else OS.Process.failure):unit;" | ./poly

# Retain this target for backwards compatibility
tests: check