File: Makefile.vc

package info (click to toggle)
mapserver 4.10.0-5.1%2Betch4
  • links: PTS
  • area: main
  • in suites: etch
  • size: 12,264 kB
  • ctags: 15,165
  • sloc: ansic: 164,837; sh: 6,141; python: 5,770; java: 5,169; perl: 2,388; cpp: 1,603; makefile: 735; lex: 507; yacc: 317; tcl: 158; cs: 85; ruby: 53
file content (93 lines) | stat: -rwxr-xr-x 2,291 bytes parent folder | download | duplicates (2)
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
#
# makefile.vc - MSVC++ makefile for the C#/MapScript extension
#
# This VC++ makefile will build the PHP module CSHARP_MAPSCRIPT.DLL
#
# To use the makefile:
#  - Open a DOS prompt window
#  - Run the VCVARS32.BAT script to initialize the VC++ environment variables
#  - Start the build with:  nmake /f makefile.vc
#
# $Id: Makefile.vc,v 1.6 2006/08/26 19:42:24 tamas Exp $
#


# Flag indicating to the option files that this is the build of C#/MapScript
!INCLUDE ../../nmake.opt

# Be aware when setting different options for libmap.dll and mapscript.dll (Bug 1476)
# To change the options for mapscript.dll uncomment the following line
# otherwise the options of nmake.opt will be used
#OPTFLAGS =	/nologo /Zi /MD $(WARNING_LEVEL) $(DEBUG)
BASE_CFLAGS = 	$(OPTFLAGS) -DWIN32 -D_WIN32
#LDFLAGS =	/NODEFAULTLIB:msvcrt /NODEFAULTLIB:libcd /dll $(LDEBUG)
LDFLAGS =	/dll $(LDEBUG)
CFLAGS = 	$(BASE_CFLAGS) $(MS_CFLAGS) -I../.. 

CC=     cl
LINK=   link

!IFDEF MONO
CSC = mcs
!ELSE
CSC = csc
!ENDIF

#SWIG = swig

!IFDEF DLLBUILD
MS_LIBS = ../../mapserver_i.lib $(EXTERNAL_LIBS)
!ELSE
MS_LIBS = $(EXTERNAL_LIBS) ../../mapserver.lib
!ENDIF

#
# The rest of the file should not have to be edited...
#

MAPSCRIPT_OBJS =  mapscript_wrap.obj  
MAPSCRIPT_DLL =   mapscript.dll
CSHARP_DLL = mapscript_csharp.dll

default: 	all

all:		interface $(MAPSCRIPT_DLL) $(CSHARP_DLL)

interface: ../mapscript.i
	$(SWIG) -csharp $(MS_DEFS) -o mapscript_wrap.c ../mapscript.i

.c.obj:
	$(CC) $(CFLAGS) /DCOMPILE_DL=1 /c $*.c /Fo$*.obj	
		
$(MAPSCRIPT_DLL): $(MAPSCRIPT_OBJS)
	$(LINK) $(LDFLAGS) /out:$(MAPSCRIPT_DLL) $(MAPSCRIPT_OBJS) $(MS_LIBS)

$(CSHARP_DLL)::
	$(CSC) /t:library /out:mapscript_csharp.dll *.cs
	$(CSC) /r:mapscript_csharp.dll /out:shpdump.exe examples\shpdump.cs
	$(CSC) /r:mapscript_csharp.dll /out:drawmap.exe examples\drawmap.cs
	$(CSC) /r:mapscript_csharp.dll /out:shapeinfo.exe examples\shapeinfo.cs

test:
!IFDEF MONO
	mono shpdump.exe ../../tests/point.shp
	mono shapeinfo.exe ../../tests/point.shp
	mono drawmap.exe ../../tests/test.map test_csharp.png
!ELSE
	shpdump ../../tests/point.shp
	shapeinfo ../../tests/point.shp
	drawmap ../../tests/test.map test_csharp.png
!ENDIF
	

clean:
	del *.obj
	del *.dll
	del *.lib
	del *.pdb
	del *.exp
	del *.ilk
	del *.cs
	del *.c
	del *.exe