-
-
Notifications
You must be signed in to change notification settings - Fork 406
Expand file tree
/
Copy pathmakefile.vc
More file actions
83 lines (64 loc) · 2.72 KB
/
makefile.vc
File metadata and controls
83 lines (64 loc) · 2.72 KB
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
#
# SWIG Stuff
#
#SWIG_HOME="D:\swig\SWIG-1.3.23\" <- should get this from ..\..\nmake.opt
#SWIG=$(SWIG_HOME)\swig
!INCLUDE ..\..\nmake.opt
MS_LIB = mapscript.lib
MS_LIB_DLL = mapscript_i.lib
#
# Java Stuff
#JAVA_HOME = "C:\Progra~1\Java\jdk1.5.0" <- should get this from ..\..\nmake.opt
JAVADOC=$(JAVA_HOME)\bin\javadoc
JAVAC=$(JAVA_HOME)\bin\javac
JAVA=$(JAVA_HOME)\bin\java
JAR=$(JAVA_HOME)\bin\jar
JAVA_INCLUDE=-I$(JAVA_HOME)\include -I$(JAVA_HOME)\include\win32
CC= cl /MD
LINK= link
MS_DLL = javamapscript.dll
BASE_CFLAGS = $(OPTFLAGS) -DWIN32 -D_WIN32
LDFLAGS = /NODEFAULTLIB:"MSVCRTD" /NODEFAULTLIB:libcd /NODEFAULTLIB:libcmtd /NODEFAULTLIB:msvcrtd /NODEFAULTLIB:LIBC /DEBUG
all: interface_release mapscript_java mapscript_lib mapscript_jar
interface_release:
-md edu\umn\gis\mapscript
$(SWIG) -java -package edu.umn.gis.mapscript -outdir edu/umn/gis/mapscript -o mapscript_wrap.c ../mapscript.i
mapscript_java:
$(JAVAC) edu\umn\gis\mapscript\*.java
mapscript_wrap:
$(CC) $(BASE_CFLAGS) $(MS_CFLAGS) $(JAVA_INCLUDE) /c mapscript_wrap.c /Fomapscript_wrap.obj
.c.obj:
$(CC) $(BASE_CFLAGS) $(MS_CFLAGS) $(JAVA_INCLUDE) /c $*.c /Fo$*.obj
mapscript_lib: mapscript_wrap.obj
link /dll /debug \
mapscript_wrap.obj $(EXTERNAL_LIBS) ..\..\mapserver_i.lib $(LDFLAGS) /def:..\..\mapserver.def \
/out:$(MS_DLL) /implib:$(MS_LIB_DLL)
if exist $(MS_DLL).manifest mt -manifest $(MS_DLL).manifest -outputresource:$(MS_DLL);2
mapscript_javadoc:
$(JAVADOC) -d doc -sourcepath edu/umn/gis/mapscript/*.java
mapscript_jar:
$(JAR) cf mapscript.jar edu
test:
$(JAVAC) -classpath ./mapscript.jar -d examples\ examples\*.java
$(JAVA) -cp ./;examples/;./mapscript.jar -Djava.library.path=. DumpShp ../../tests/point.shp
$(JAVA) -cp ./;examples/;./mapscript.jar -Djava.library.path=. ShapeInfo ..\..\tests\point.shp ..\..\tests\point.dbf
$(JAVA) -cp ./;examples/;./mapscript.jar -Djava.library.path=. DrawMap ..\..\tests\test.map .\map.png
$(JAVA) -cp ./;examples/;./mapscript.jar -Djava.library.path=. RFC24 ..\..\tests\test.map
threadtests:
$(JAVAC) -cp ./mapscript.jar -d tests/threadtest/ tests/threadtest/*.java
@echo "-------------------------------------------------------------------------"
@echo " You can use your own map! Copy the following command in your shell"
@echo " and change the file to the map file (the last argument)"
@echo "-------------------------------------------------------------------------"
$(JAVA) -cp tests/threadtest/;./mapscript.jar -Djava.library.path=. MapTest -t 10 -i 5 ../../tests/test.map
clean:
-del *.obj
-del *.lib
-rmdir /s /q edu
del $(MS_DLL)
del $(MS_DLL).manifest
del mapscript_wrap.c
del mapscript.jar
del *.ilk
del *.pdb
del *.exp