Re-generated configure
[chr.git] / Makefile.mak
blob7512e53e2a39543acd69295dc7fa40950064620f
1 ################################################################
2 # Install CHR stuff for the MS-Windows build
3 # Author: Jan Wielemaker
4 #
5 # Use:
6 # nmake /f Makefile.mak
7 # nmake /f Makefile.mak install
8 ################################################################
10 PLHOME=..\..
11 !include $(PLHOME)\src\rules.mk
12 CFLAGS=$(CFLAGS) /D__SWI_PROLOG__
13 LIBDIR=$(PLBASE)\library
14 EXDIR=$(PKGDOC)\examples\chr
15 CHR=$(LIBDIR)\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 \
25 chr_support.dll
26 CHRPL= chr_swi.pl
27 EXAMPLES= chrfreeze.chr fib.chr gcd.chr primes.chr \
28 bool.chr family.chr fibonacci.chr leq.chr listdom.chr \
29 chrdif.chr
32 chr_support.dll: chr_support.obj
33 $(LD) /dll /out:$@ $(LDFLAGS) chr_support.obj $(PLLIB)
35 all: chr_translate.pl chr_support.dll
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" \
40 -t "halt(1)"
41 $(PL) -q -f chr_swi_bootstrap.pl \
42 -g "chr_compile_step2('chr_translate_bootstrap1.chr','chr_translate_bootstrap1.pl'),halt" \
43 -t "halt(1)"
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" \
48 -t 'halt(1)'
49 $(PL) -q -f chr_swi_bootstrap.pl \
50 -g "chr_compile_step3('chr_translate_bootstrap2.chr','chr_translate_bootstrap2.pl'),halt" \
51 -t 'halt(1)'
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" \
56 -t 'halt(1)'
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" \
61 -t 'halt(1)'
62 $(PL) -p chr=. -q -f chr_swi_bootstrap.pl \
63 -g "chr_compile_step4('guard_entailment.chr','guard_entailment.pl'),halt" \
64 -t 'halt(1)'
65 $(PL) -p chr=. -q -f chr_swi_bootstrap.pl \
66 -g "chr_compile_step4('chr_translate.chr','chr_translate.pl'),halt" \
67 -t 'halt(1)'
69 chr.pl: chr_swi.pl
70 copy chr_swi.pl chr.pl
72 check: chr.pl
73 $(PL) -q -f chr_test.pl -g test,halt -t 'halt(1)'
76 !IF "$(CFG)" == "rt"
77 install::
78 !ELSE
79 install::
80 @if not exist "$(CHR)\$(NULL)" $(MKDIR) "$(CHR)"
81 @for %f in ($(LIBPL)) do \
82 copy "%f" "$(CHR)"
83 copy $(CHRPL) "$(LIBDIR)\chr.pl"
84 copy README "$(CHR)\README.TXT"
85 $(MAKEINDEX)
86 !ENDIF
88 html-install: install-examples
89 pdf-install: install-examples
91 install-examples::
92 if not exist "$(EXDIR)/$(NULL)" $(MKDIR) "$(EXDIR)"
93 cd examples & @for %f in ($(EXAMPLES)) do @copy %f "$(EXDIR)"
95 xpce-install::
97 uninstall::
98 @for %f in ($(LIBPL)) do \
99 del "$(CHR)\%f"
100 del "$(CHR)\README.TXT"
101 del "$(LIBDIR)\chr.pl"
102 $(MAKEINDEX)
104 clean::
105 if exist *~ del *~
106 -del chr.pl chr_translate.pl
107 -del chr_translate_bootstrap1.pl chr_translate_bootstrap2.pl
108 -del guard_entailment.pl
110 distclean: clean