forked from SWI-Prolog/packages-ssl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.mak
74 lines (58 loc) · 1.63 KB
/
Makefile.mak
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
################################################################
# Build the SWI-Prolog SSL package for MS-Windows
#
# Author: Jan Wielemaker
#
# Use:
# nmake /f Makefile.mak
# nmake /f Makefile.mak install
################################################################
PLHOME=..\..
!include ..\..\src\rules.mk
PKGDLL=ssl4pl
EXDIR= $(PKGDOC)\examples\ssl
HTTPDIR= $(PLBASE)\library\http
CFLAGS= -D__SWI_PROLOG__ $(CFLAGS)
#
# Constants below are defined in rules.mk
#
LIB=$(LIB);$(OPENSSLLIBDIR)
INCLUDE=$(INCLUDE);$(OPENSSLINCDIR)
EXAMPLES= client.pl server.pl https.pl
OBJ= ssl4pl.obj ssllib.obj ..\clib\error.obj
all: $(PKGDLL).dll
$(PKGDLL).dll: $(OBJ) ..\clib\socket.lib
$(LD) /dll /out:$@ $(LDFLAGS) $(OBJ) $(PLLIB) $(LIBS) \
ssleay32.lib libeay32.lib ..\clib\socket.lib
!IF "$(CFG)" == "rt"
install: all idll
!ELSE
install: all idll ilib
!ENDIF
idll::
copy $(PKGDLL).dll "$(BINDIR)"
!IF "$(PDB)" == "true"
copy $(PKGDLL).pdb "$(BINDIR)"
!ENDIF
ilib::
copy ssl.pl "$(PLBASE)\library"
if not exist "$(HTTPDIR)/$(NULL)" $(MKDIR) "$(HTTPDIR)"
copy http_ssl_plugin.pl "$(HTTPDIR)"
$(MAKEINDEX)
xpce-install::
html-install: install-examples
copy ssl.html "$(PKGDOC)"
install-examples::
if not exist "$(EXDIR)/$(NULL)" $(MKDIR) "$(EXDIR)"
@for %f in ($(EXAMPLES)) do @copy %f "$(EXDIR)"
xcopy /Q /S /I /Y etc "$(EXDIR)\etc"
if exist "$(EXDIR)\etc\README.TXT" del "$(EXDIR)\etc\README.TXT"
ren "$(EXDIR)\etc\README" "README.TXT"
uninstall::
del "$(PLBASE)\bin\$(PKGDLL).dll"
del "$(PLBASE)\library\ssl.pl"
$(MAKEINDEX)
clean::
-del *.obj *~ 2>nul
distclean: clean
-del *.dll *.lib *.exe *.pdb *.ilk 2>nul