aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Warmerdam <warmerdam@pobox.com>2008-03-15 16:51:46 +0000
committerFrank Warmerdam <warmerdam@pobox.com>2008-03-15 16:51:46 +0000
commit111ba0714927e0bdca41a6c78e4191fba7172ab6 (patch)
treeaf7f360641df9eadda4ab5454887e2ff6a249bb4
parent6d37fd30b55a5840bec6544b3136d72f5c2eea2d (diff)
downloadPROJ-111ba0714927e0bdca41a6c78e4191fba7172ab6.tar.gz
PROJ-111ba0714927e0bdca41a6c78e4191fba7172ab6.zip
major rework of windows makefiles to better support installing
git-svn-id: http://svn.osgeo.org/metacrs/proj/trunk@1443 4e78687f-474d-0410-85f9-8d5e500ac6b2
-rw-r--r--ChangeLog5
-rw-r--r--makefile.vc19
-rw-r--r--nad/makefile.vc34
-rw-r--r--nmake.opt24
-rw-r--r--src/makefile.vc39
5 files changed, 90 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index 74f2d121..f4035e82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-15 Frank Warmerdam <warmerdam@pobox.com>
+
+ * rename INSTALL to INSTALL.TXT to avoid screwing up "make install"
+ * Rework win32 makefiles to support "make install", and better
+ knowledge of grid shift files,
2008-01-18 IGNF <didier.richard@ign.fr>
* PJ_eqc.c : Merged eqr and eqc after advise from Gerald. eqc is
diff --git a/makefile.vc b/makefile.vc
index 41b82db4..ebede4c6 100644
--- a/makefile.vc
+++ b/makefile.vc
@@ -8,19 +8,24 @@
MAKE = nmake
RM = -del
-default: src_dir
-
-src_dir:
+default:
cd src
$(MAKE) /f makefile.vc
+ cd ..\nad
+ $(MAKE) /f makefile.vc
cd ..
clean:
cd src
$(MAKE) /f makefile.vc clean
- $(RM) *.exe
- $(RM) *.ilk
- $(RM) *.manifest
- $(RM) *.pdb
+ cd ..\nad
+ $(MAKE) /f makefile.vc clean
+ cd ..
+
+install:
+ cd src
+ $(MAKE) /f makefile.vc install
+ cd ..\nad
+ $(MAKE) /f makefile.vc install-all
cd ..
diff --git a/nad/makefile.vc b/nad/makefile.vc
new file mode 100644
index 00000000..c17e2497
--- /dev/null
+++ b/nad/makefile.vc
@@ -0,0 +1,34 @@
+#
+# $Id$
+#
+# makefile.vc - builds PROJ.4 library with Visual C++
+#
+
+!INCLUDE ..\nmake.opt
+
+OLD_GRIDS = conus MD TN WI WO alaska hawaii prvi stgeorge stlrnc stpaul null
+
+OTHER_FILES = GL27 nad.lst nad27 nad83 proj_def.dat world epsg esri \
+ esri.extra other.extra IGNF ntf_r93.gsb
+
+
+
+default:
+ if exist conus.lla $(MAKE) /f makefile.vc nadshift
+
+nadshift:
+ for %f in ( $(OLD_GRIDS) ) do ..\src\nad2bin.exe %f < %f.lla
+
+clean:
+ -for %f in ( $(OLD_GRIDS) ) do del %f
+
+install-nadgrids:
+ for %f in ( $(OLD_GRIDS) ) do copy %f $(INSTDIR)\share
+
+install-all:
+ -mkdir $(INSTDIR)
+ -mkdir $(INSTDIR)\share
+ for %f in ( $(OTHER_FILES) ) do copy %f $(INSTDIR)\share
+ if exist conus $(MAKE) /f makefile.vc install-nadgrids
+ -copy *.gsb $(INSTDIR)\share
+ -copy ntv1_can.dat $(INSTDIR)\share
diff --git a/nmake.opt b/nmake.opt
new file mode 100644
index 00000000..33c6eb18
--- /dev/null
+++ b/nmake.opt
@@ -0,0 +1,24 @@
+#
+# Set the following to the directory where the PROJ distribution
+# data files (ie, the contents of ..\NAD). The following assumes
+# the PROJ distribution is unpacked as C:\PROJ, which generally must
+# be adjusted. It is also possible to leave this, and define the
+# PROJ_LIB environment variable to point to the NAD directory.
+#
+PROJ_LIB_DIR=C:/PROJ/SHARE
+
+# Directory tree where PROJ will be installed.
+INSTDIR=C:\PROJ
+
+# Uncomment the first for an optimized build, or the second for debug.
+OPTFLAGS= /nologo /Ox /MD
+#OPTFLAGS= /nologo /Zi /MD /Fdproj.pdb
+
+# Uncomment the first for linking exes against DLL or second for static
+EXE_PROJ = proj_i.lib
+#EXE_PROJ = proj.lib
+
+# Set the version number for the DLL. Normally we leave this blank since
+# we want software that is dynamically loading the DLL to have no problem
+# with version numbers.
+VERSION=
diff --git a/src/makefile.vc b/src/makefile.vc
index b1e992a5..0b0ab354 100644
--- a/src/makefile.vc
+++ b/src/makefile.vc
@@ -2,28 +2,7 @@
#
# makefile.vc - builds PROJ.4 library with Visual C++
#
-
-#
-# Set the following to the directory where the PROJ distribution
-# data files (ie, the contents of ..\NAD). The following assumes
-# the PROJ distribution is unpacked as C:\PROJ, which generally must
-# be adjusted. It is also possible to leave this, and define the
-# PROJ_LIB environment variable to point to the NAD directory.
-#
-PROJ_LIB_DIR=C:/PROJ/NAD
-
-# Uncomment the first for an optimized build, or the second for debug.
-OPTFLAGS= /nologo /Ox /MD
-#OPTFLAGS= /nologo /Zi /MD /Fdproj.pdb
-
-# Uncomment the first for linking exes against DLL or second for static
-EXE_PROJ = proj_i.lib
-#EXE_PROJ = proj.lib
-
-# Set the version number for the DLL. Normally we leave this blank since
-# we want software that is dynamically loading the DLL to have no problem
-# with version numbers.
-VERSION=
+!INCLUDE ..\nmake.opt
azimuthal = \
PJ_aeqd.obj PJ_gnom.obj PJ_laea.obj PJ_mod_ster.obj \
@@ -89,9 +68,9 @@ CFLAGS = /nologo -I. -DPROJ_LIB=\"$(PROJ_LIB_DIR)\" \
default: all
-all: proj.lib $(PROJ_EXE) $(CS2CS_EXE) $(GEOD_EXE)
+all: proj.lib $(PROJ_EXE) $(CS2CS_EXE) $(GEOD_EXE) $(NAD2BIN_EXE)
-# Disabled: $(NAD2NAD_EXE) $(NAD2BIN_EXE)
+# Disabled: $(NAD2NAD_EXE)
proj.lib: $(LIBOBJ)
if exist proj.lib del proj.lib
@@ -146,3 +125,15 @@ clean:
del *.lib
del *.obj
del *.pdb
+
+install: all
+ -mkdir $(INSTDIR)
+ -mkdir $(INSTDIR)\bin
+ -mkdir $(INSTDIR)\share
+ -mkdir $(INSTDIR)\lib
+ -mkdir $(INSTDIR)\include
+ copy *.exe $(INSTDIR)\bin
+ copy *.dll $(INSTDIR)\bin
+ copy *.lib $(INSTDIR)\lib
+ copy proj_api.h $(INSTDIR)\include
+