1 ################################################################
2 # Install CHR stuff for the MS-Windows build
3 # Author: Jan Wielemaker
6 # nmake /f Makefile.mak
7 # nmake /f Makefile.mak install
8 ################################################################
11 !include $(PLHOME
)\src
\rules.mk
12 CFLAGS
=$(CFLAGS
) /D__SWI_PROLOG__
13 LIBDIR
=$(PLBASE
)\library
14 EXDIR
=$(PKGDOC
)\examples\chr
16 PL
="$(PLHOME)\bin\plcon.exe" -L80M
-G50M
-T20M
18 LIBPL
= chr_runtime.pl chr_op.pl chr_translate.pl chr_debug.pl \
19 chr_messages.pl hprolog.pl pairlist.pl clean_code.pl \
20 find.pl a_star.pl binomialheap.pl builtins.pl \
21 chr_hashtable_store.pl listmap.pl guard_entailment.pl \
22 chr_compiler_options.pl chr_compiler_utility.pl \
23 chr_compiler_errors.pl \
24 chr_integertable_store.pl \
27 EXAMPLES
= chrfreeze.chr fib.chr gcd.chr primes.chr \
28 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
32 all: chr_translate.pl chr_support.dll
34 chr_support.dll
: chr_support.obj
35 $(LD
) /dll
/out
:$@
$(LDFLAGS
) chr_support.obj
$(PLLIB
)
37 chr_translate_bootstrap1.pl
: chr_translate_bootstrap1.chr
38 $(PL
) -q
-f chr_swi_bootstrap.pl \
39 -g
"chr_compile_step1('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
41 $(PL
) -q
-f chr_swi_bootstrap.pl \
42 -g
"chr_compile_step2('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
45 chr_translate_bootstrap2.pl
: chr_translate_bootstrap2.chr chr_translate_bootstrap1.pl
46 $(PL
) -q
-f chr_swi_bootstrap.pl \
47 -g
"chr_compile_step2('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
49 $(PL
) -q
-f chr_swi_bootstrap.pl \
50 -g
"chr_compile_step3('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
53 guard_entailment.pl
: guard_entailment.chr chr_translate_bootstrap2.pl
54 $(PL
) -q
-f chr_swi_bootstrap.pl \
55 -g
"chr_compile_step3('guard_entailment.chr','guard_entailment.pl'),halt" \
58 chr_translate.pl
: chr_translate.chr chr_translate_bootstrap2.pl guard_entailment.pl
59 $(PL
) -q
-f chr_swi_bootstrap.pl \
60 -g
"chr_compile_step3('chr_translate.chr','chr_translate.pl'),halt" \
62 $(PL
) -p chr
=.
-q
-f chr_swi_bootstrap.pl \
63 -g
"chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
65 $(PL
) -p chr
=.
-q
-f chr_swi_bootstrap.pl \
66 -g
"chr_compile_step4('chr_translate.chr','chr_translate.pl'),halt" \
70 copy chr_swi.pl chr.pl
73 $(PL
) -q
-f chr_test.pl
-g
test,halt
-t
'halt(1)'
80 @if not exist
"$(CHR)\$(NULL)" $(MKDIR
) "$(CHR)"
81 @for
%f in
($(LIBPL
)) do \
83 copy
$(CHRPL
) "$(LIBDIR)\chr.pl"
84 copy README
"$(CHR)\README.TXT"
88 html-install
: install-examples
89 pdf-install
: install-examples
92 if not exist
"$(EXDIR)/$(NULL)" $(MKDIR
) "$(EXDIR)"
93 cd examples
& @for
%f in
($(EXAMPLES
)) do @copy
%f
"$(EXDIR)"
98 @for
%f in
($(LIBPL
)) do \
100 del
"$(CHR)\README.TXT"
101 del
"$(LIBDIR)\chr.pl"
106 -del chr.pl chr_translate.pl
107 -del chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
108 -del guard_entailment.pl