"Fossies" - the Fresh Open Source Software Archive

Member "epstool-3.08/srcwin/windows.mak" (10 Jun 2005, 10433 Bytes) of package /linux/misc/old/ghost/ghostgum/epstool-3.08-os2.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Make source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # Copyright (C) 2002-2005 Ghostgum Software Pty Ltd.  All rights reserved.
    2 #
    3 #  This software is provided AS-IS with no warranty, either express or
    4 #  implied.
    5 #
    6 #  This software is distributed under licence and may not be copied,
    7 #  modified or distributed except as expressly authorised under the terms
    8 #  of the licence contained in the file LICENCE in this distribution.
    9 #
   10 #  For more information about licensing, please refer to
   11 #  http://www.ghostgum.com.au/ or contact Ghostsgum Software Pty Ltd, 
   12 #  218 Gallaghers Rd, Glen Waverley VIC 3150, AUSTRALIA, 
   13 #  Fax +61 3 9886 6616.
   14 #
   15 
   16 # $Id: windows.mak,v 1.1.2.25 2005/06/10 09:39:24 ghostgum Exp $
   17 # Windows makefile for MSVC
   18 
   19 # Try to detect the compiler version
   20 !if defined(_NMAKE_VER) && !defined(VCVER)
   21 !if "$(_NMAKE_VER)" == "162"
   22 VCVER=5
   23 !endif
   24 !if "$(_NMAKE_VER)" == "6.00.8168.0"
   25 VCVER=6
   26 !endif
   27 !if "$(_NMAKE_VER)" == "7.00.9466"
   28 VCVER=7
   29 !endif
   30 !if "$(_NMAKE_VER)" == "7.10.3077"
   31 VCVER=71
   32 !endif
   33 !if "$(_NMAKE_VER)" == "8.00.40607.16"
   34 VCVER=8
   35 !endif
   36 !endif
   37 
   38 # Edit VCVER and DEVBASE as required
   39 !ifndef VCVER
   40 VCVER=71
   41 !endif
   42 
   43 !ifndef VCDRIVE
   44 VCDRIVE=C:
   45 !endif
   46 
   47 # Win64 requires Microsoft Visual Studio 8 (.NET 2005)
   48 # or Microsoft Visual Studio .NET 2003 with Windows Server 2003 DDK.
   49 # To compile for Win64, use "nmake WIN64=1"
   50 !ifdef WIN64
   51 WIN32=0
   52 WIN64=1
   53 !else
   54 WIN32=1
   55 WIN64=0
   56 !endif
   57 
   58 
   59 # When compiling on Win64, x86 programs are in different place
   60 !ifndef PROGFILESX86
   61 PROGFILESX86=Program Files
   62 #PROGFILESX86=Program Files (x86)
   63 !endif
   64 
   65 
   66 !if $(VCVER) <= 5
   67 DEVBASE=$(VCDRIVE)\$(PROGFILESX86)\devstudio
   68 !endif
   69 !if $(VCVER) == 6
   70 DEVBASE=$(VCDRIVE)\$(PROGFILESX86)\Microsoft Visual Studio
   71 !endif
   72 !if $(VCVER) == 7
   73 DEVBASE=$(VCDRIVE)\$(PROGFILESX86)\Microsoft Visual Studio .NET
   74 !endif
   75 !if $(VCVER) == 71
   76 DEVBASE=$(VCDRIVE)\$(PROGFILESX86)\Microsoft Visual Studio .NET 2003
   77 DDKBASE=$(VCDRIVE)\winddk\3790
   78 !endif
   79 !if $(VCVER) == 8
   80 DEVBASE=$(VCDRIVE)\$(PROGFILESX86)\Microsoft Visual Studio 8
   81 !endif
   82 
   83 # DEBUG=1 for Debugging options
   84 DEBUG=1
   85 
   86 BINDIR=.\bin
   87 OBJDIR=.\obj
   88 SRCDIR=.\src
   89 SRCWINDIR=.\srcwin
   90 
   91 !ifndef LIBPNGINC
   92 LIBPNGINC=-Ilibpng -Izlib
   93 LIBPNGCFLAGS=-DHAVE_LIBPNG -DPNG_USE_DLL
   94 LIBPNGLIBS=libpng\libpng.lib zlib\zlib.lib
   95 !endif
   96 
   97 !if $(VCVER) <= 5
   98 COMPBASE=$(DEVBASE)\vc
   99 !endif
  100 !if $(VCVER) == 6
  101 COMPBASE=$(DEVBASE)\vc98
  102 !endif
  103 !if ($(VCVER) == 7) || ($(VCVER) == 71) 
  104 COMPBASE=$(DEVBASE)\Vc7
  105 PLATLIBDIR=$(COMPBASE)\PlatformSDK\lib
  106 !endif
  107 !if $(VCVER) == 8
  108 COMPBASE = $(DEVBASE)\VC
  109 PLATLIBDIR=$(COMPBASE)\PlatformSDK\lib
  110 !endif
  111 
  112 # MSVC 8 (2005) warns about deprecated common functions like fopen.
  113 !if $(VCVER) == 8
  114 VC8WARN=/wd4996
  115 !else
  116 VC8WARN=
  117 !endif
  118 
  119 COMPDIR=$(COMPBASE)\bin
  120 INCDIR=$(COMPBASE)\include
  121 LIBDIR=$(COMPBASE)\lib
  122 !ifndef PLATLIBDIR
  123 PLATLIBDIR=$(LIBDIR)
  124 !endif
  125 
  126 !ifdef UNICODE
  127 UNICODEDEF=-DUNICODE
  128 !endif
  129 
  130 CDEFS=-D_Windows -D__WIN32__ -I"$(INCDIR)" $(UNICODEDEF) $(LIBPNGCFLAGS) $(LARGEFILES)
  131 WINEXT=32
  132 CFLAGS=$(CDEFS) /MT /nologo /W4 $(VC8WARN)
  133 
  134 !if $(DEBUG)
  135 DEBUGLINK=/DEBUG
  136 CDEBUG=/Zi
  137 !endif
  138 
  139 !if $(WIN32)
  140 MODEL=32
  141 CCAUX = "$(COMPDIR)\cl" -I"$(INCDIR)"
  142 CC = "$(COMPDIR)\cl" $(CDEBUG)
  143 CLINK=$(CC)
  144 LINK = "$(COMPDIR)\link"
  145 LINKMACHINE=IX86
  146 
  147 !else if $(WIN64)
  148 MODEL=32
  149 CCAUX = "$(COMPDIR)\cl" -I"$(INCDIR)"
  150 !if $(VCVER) == 71
  151 LINKMACHINE=X86
  152 CC="$(DDKBASE)\bin\win64\x86\amd64\cl" $(CDEBUG)
  153 CLINK=$(CC)
  154 LINK="$(DDKBASE)\bin\win64\x86\amd64\link"
  155 LIBDIR=$(DDKBASE)\lib\wnet\amd64
  156 PLATLIBDIR=$(DDKBASE)\lib\wnet\amd64
  157 !else
  158 LINKMACHINE=X64
  159 CC="$(COMPDIR)\x86_amd64\cl" $(CDEBUG)
  160 CLINK=$(CC)
  161 LINK="$(COMPDIR)\x86_amd64\link"
  162 LIBDIR=$(COMPBASE)\lib\amd64
  163 PLATLIBDIR=$(COMPBASE)\PlatformSDK\Lib\AMD64
  164 !endif
  165 !endif
  166 
  167 
  168 CLFLAG=
  169 RIFLAGS=-i"$(INCDIR)" -i"$(SRCDIR)" -i"$(SRCWINDIR)" -i"$(OBJDIR)"
  170 !if $(VCVER) <= 5
  171 HC="$(COMPDIR)\hcw" /C /E
  172 RCOMP="$(DEVBASE)\sharedide\bin\rc" -D_MSC_VER $(CDEFS) $(RIFLAGS)
  173 !endif
  174 !if $(VCVER) == 6
  175 HC="$(DEVBASE)\common\tools\hcw" /C /E
  176 RCOMP="$(DEVBASE)\common\msdev98\bin\rc" -D_MSC_VER $(CDEFS) $(RIFLAGS)
  177 !endif
  178 !if ($(VCVER) == 7) || ($(VCVER) == 71) 
  179 HC="$(DEVBASE)\Common7\Tools\hcw" /C /E
  180 RCOMP="$(DEVBASE)\Vc7\bin\rc" -D_MSC_VER $(CDEFS) $(RIFLAGS)
  181 !endif
  182 !if $(VCVER) == 8
  183 HC="$(DEVBASE)\VC\bin\hcw" /C /E
  184 RCOMP="$(DEVBASE)\VC\bin\rc" -D_MSC_VER $(CDEFS) $(RIFLAGS)
  185 !endif
  186 
  187 COMP=$(CC) -I$(SRCDIR) -I$(SRCWINDIR) -I$(OBJDIR) $(CFLAGS)
  188 
  189 
  190 NUL=
  191 DD=\$(NUL)
  192 SRC=$(SRCDIR)\$(NUL)
  193 SRCWIN=$(SRCWINDIR)\$(NUL)
  194 OD=$(OBJDIR)\$(NUL)
  195 BD=$(BINDIR)\$(NUL)
  196 OBJ=.obj
  197 EXE=.exe
  198 CO=-c
  199 
  200 FE=-Fe
  201 FO=-Fo
  202 FEO=-Fe$(OD)
  203 FOO=-Fo$(OD)
  204 
  205 CP=copy
  206 RM=del
  207 RMDIR=rmdir /s /q
  208 
  209 # simple viewer 
  210 OBJPLAT1=$(OD)wapp$(OBJ) $(OD)wdll$(OBJ) $(OD)wdoc$(OBJ) \
  211  $(OD)wgsimg$(OBJ) $(OD)wgssrv$(OBJ) $(OD)wgsver$(OBJ) $(OD)wimg$(OBJ) \
  212  $(OD)wfile$(OBJ)
  213 VIEWAPIOBJ=$(OBJPLAT1) $(OBJCOM1) $(OBJCOM2) $(OD)wviewapi$(OBJ)
  214 
  215 # complex viewer
  216 OBJPLAT2=$(OD)wview$(OBJ) $(OD)wviewwin$(OBJ) $(OD)main$(OBJ)
  217 OBJPLAT=$(OBJPLAT1) $(OBJPLAT2)
  218 
  219 # another complex viewer
  220 VIEWOBJ=$(OBJPLAT1) $(OBJCOM1) $(OBJCOM2) \
  221  $(OD)wtest2$(OBJ) $(OD)wtest3$(OBJ) $(OD)cvcmd$(OBJ)
  222 
  223 # epstool
  224 EPSOBJPLAT=$(OD)wdll$(OBJ) $(OD)wgsver$(OBJ) $(OD)wfile$(OBJ)
  225 EPSLIB="$(PLATLIBDIR)\advapi32.lib" $(LIBPNGLIBS) /link /LIBPATH:"$(LIBDIR)"
  226 
  227 HDRSPLAT=$(SRCWIN)wimg.h $(SRCWIN)wgsver.h
  228 
  229 
  230 OBJSBEGIN=$(OD)lib.rsp
  231 #TARGET=$(BD)main$(EXE)
  232 #TARGET=$(BD)epstool$(EXE)
  233 TARGET=gsview_test1
  234 
  235 !include $(SRC)common.mak
  236 
  237 $(OD)lib.rsp: makefile
  238     -mkdir $(BINDIR)
  239     -mkdir $(OBJDIR)
  240         echo "$(PLATLIBDIR)\shell32.lib" > $(OD)lib.rsp
  241         echo "$(PLATLIBDIR)\comdlg32.lib" >> $(OD)lib.rsp
  242         echo "$(PLATLIBDIR)\gdi32.lib" >> $(OD)lib.rsp
  243         echo "$(PLATLIBDIR)\user32.lib" >> $(OD)lib.rsp
  244         echo "$(PLATLIBDIR)\winspool.lib" >> $(OD)lib.rsp
  245         echo "$(PLATLIBDIR)\advapi32.lib" >> $(OD)lib.rsp
  246         echo "$(PLATLIBDIR)\ole32.lib" >> $(OD)lib.rsp
  247         echo "$(PLATLIBDIR)\uuid.lib" >> $(OD)lib.rsp
  248     echo /NODEFAULTLIB:LIBC.lib >> $(OD)lib.rsp
  249         echo "$(LIBDIR)\libcmt.lib" >> $(OD)lib.rsp
  250 !if "$(LIBPNGLIBS)" != ""
  251     echo $(LIBPNGLIBS) >> $(OD)lib.rsp
  252 !endif
  253 
  254 
  255 # A command line program for testing GSview on Windows.
  256 
  257 $(BD)main.exe: $(OBJS) $(OD)lib.rsp
  258     echo $(OBJS) > $(OD)link.rsp
  259     $(LINK) $(DEBUGLINK) /OUT:$(BD)main.exe @$(OD)link.rsp @$(OD)lib.rsp
  260 
  261 $(OD)main.obj: $(SRCWIN)main.c $(HDRS)
  262     $(COMP) $(FOO)main$(OBJ) $(CO) $(SRCWIN)main.c
  263 
  264 # A DLL with a simplified interface to GSview.  This is intended
  265 # to be used by an ActiveX control.
  266 
  267 gsview_test1: $(BD)gsview_test1.dll $(BD)wviewapi_example.exe $(BD)wtest1.exe $(BD)wtest3.exe
  268 
  269 $(BD)gsview_test1.dll: $(VIEWAPIOBJ) $(OD)lib.rsp
  270     echo $(VIEWAPIOBJ) > $(OD)link.rsp
  271     $(LINK) $(DEBUGLINK) /DLL /OUT:$(BD)gsview_test1.dll @$(OD)link.rsp @$(OD)lib.rsp
  272 
  273 $(OD)wviewapi.obj: $(SRCWIN)wviewapi.c $(HDRS)
  274     $(COMP) $(FOO)wviewapi$(OBJ) $(CO) $(SRCWIN)wviewapi.c
  275 
  276 $(BD)wviewapi_example.exe: $(SRCWIN)wviewapi_example.c $(SRCWIN)wviewapi.h $(BD)gsview_test1.dll
  277     $(COMP) $(FE)$(BD)wviewapi_example.exe $(SRCWIN)wviewapi_example.c $(BD)gsview_test1.lib
  278 
  279 $(BD)wtest1$(EXE): $(OD)wtest1$(OBJ) $(OD)wtest2$(OBJ) $(OD)wtest1.res $(SRCWIN)wviewapi.h $(BD)gsview_test1.dll $(OD)lib.rsp
  280     $(LINK) $(DEBUGLINK) /SUBSYSTEM:WINDOWS /OUT:$(BD)wtest1$(EXE) $(OD)wtest1$(OBJ) $(OD)wtest2$(OBJ) $(BD)gsview_test1.lib @$(OD)lib.rsp $(OD)wtest1.res
  281 
  282 $(BD)wtest3$(EXE): $(VIEWOBJ) $(OD)wtest1.res $(OD)lib.rsp
  283     $(LINK) $(DEBUGLINK) /SUBSYSTEM:WINDOWS /OUT:$(BD)wtest3$(EXE) $(VIEWOBJ) @$(OD)lib.rsp $(OD)wtest1.res
  284 
  285 $(OD)wtest1.res: $(SRCWIN)wtest1.h $(SRCWIN)wtest1.rc
  286     $(RCOMP) -i"srcwin" -fo$(OD)wtest1.res $(SRCWIN)wtest1
  287 
  288 
  289 # Windows specific
  290 
  291 $(OD)wapp$(OBJ): $(SRCWIN)wapp.c $(HDRS)
  292     $(COMP) $(FOO)wapp$(OBJ) $(CO) $(SRCWIN)wapp.c
  293 
  294 $(OD)wdll$(OBJ): $(SRCWIN)wdll.c $(HDRS)
  295     $(COMP) $(FOO)wdll$(OBJ) $(CO) $(SRCWIN)wdll.c
  296 
  297 $(OD)wdoc$(OBJ): $(SRCWIN)wdoc.c $(HDRS)
  298     $(COMP) $(FOO)wdoc$(OBJ) $(CO) $(SRCWIN)wdoc.c
  299 
  300 $(OD)wfile$(OBJ): $(SRCWIN)wfile.c $(cfile_h)
  301     $(COMP) $(FOO)wfile$(OBJ) $(CO) $(SRCWIN)wfile.c
  302 
  303 $(OD)wgsimg$(OBJ): $(SRCWIN)wgsimg.c $(HDRS)
  304     $(COMP) $(FOO)wgsimg$(OBJ) $(CO) $(SRCWIN)wgsimg.c
  305 
  306 $(OD)wgssrv$(OBJ): $(SRCWIN)wgssrv.c $(HDRS)
  307     $(COMP) $(FOO)wgssrv$(OBJ) $(CO) $(SRCWIN)wgssrv.c
  308 
  309 $(OD)wgsver$(OBJ): $(SRCWIN)wgsver.c $(HDRS)
  310     $(COMP) $(FOO)wgsver$(OBJ) $(CO) $(SRCWIN)wgsver.c
  311 
  312 $(OD)wimg$(OBJ): $(SRCWIN)wimg.c $(HDRS)
  313     $(COMP) $(FOO)wimg$(OBJ) $(CO) $(SRCWIN)wimg.c
  314 
  315 $(OD)wview$(OBJ): $(SRCWIN)wview.c $(HDRS)
  316     $(COMP) $(FOO)wview$(OBJ) $(CO) $(SRCWIN)wview.c
  317 
  318 $(OD)wviewwin$(OBJ): $(SRCWIN)wviewwin.c $(HDRS)
  319     $(COMP) $(FOO)wviewwin$(OBJ) $(CO) $(SRCWIN)wviewwin.c
  320 
  321 $(OD)wtest1$(OBJ): $(SRCWIN)wtest1.c $(SRCWIN)wtest1.h $(SRCWIN)wtest2.h $(HDRS)
  322     $(COMP) $(FOO)wtest1$(OBJ) $(CO) $(SRCWIN)wtest1.c
  323 
  324 $(OD)wtest2$(OBJ): $(SRCWIN)wtest2.c $(SRCWIN)wtest1.h $(SRCWIN)wtest2.h $(HDRS)
  325     $(COMP) $(FOO)wtest2$(OBJ) $(CO) $(SRCWIN)wtest2.c
  326 
  327 $(OD)wtest3$(OBJ): $(SRCWIN)wtest3.c $(SRCWIN)wtest1.h $(SRCWIN)wtest2.h $(HDRS)
  328     $(COMP) $(FOO)wtest3$(OBJ) $(CO) $(SRCWIN)wtest3.c
  329 
  330 
  331 wtest1: $(BD)wtest1$(EXE)
  332 
  333 wtest3: $(BD)wtest3$(EXE)
  334 
  335 epstool: $(BD)epstool$(EXE)
  336 
  337 epstool_make:
  338     nmake -f $(SRCWIN)windows.mak VCVER=$(VCVER) VCDRIVE=$(VCDRIVE) LIBPNGINC= LIBPNGCFLAGS= LIBPNGLIBS= $(BD)epstool$(EXE)
  339  
  340 epstest: epstool_make
  341     nmake -f $(SRCWIN)windows.mak VCVER=$(VCVER) VCDRIVE=$(VCDRIVE) LIBPNGINC= LIBPNGCFLAGS= LIBPNGLIBS= $(BD)epstest$(EXE)
  342     $(BD)epstest$(EXE)  
  343  
  344 clean:
  345     -del $(OBJS)
  346     -del $(EPSOBJS)
  347     -del $(VIEWAPIOBJ)
  348     -del $(BD)main.exe
  349     -del $(BD)main.ilk
  350     -del $(BD)main.pdb
  351     -del $(BD)epstool.exe
  352     -del $(BD)epstool.ilk
  353     -del $(BD)epstool.pdb
  354     -del $(BD)gsview_test1.dll
  355     -del $(BD)gsview_test1.exp
  356     -del $(BD)gsview_test1.lib
  357     -del $(BD)gsview_test1.ilk
  358     -del $(BD)gsview_test1.pdb
  359     -del $(BD)wviewapi_example.exe
  360     -del $(BD)wviewapi_example.ilk
  361     -del $(BD)wviewapi_example.pdb
  362     -del $(OD)wtest1.obj
  363     -del $(OD)wtest1.res
  364     -del $(BD)wtest1.exe
  365     -del $(BD)wtest1.ilk
  366     -del $(BD)wtest1.pdb
  367     -del $(OD)wtest3.obj
  368     -del $(OD)wtest3.res
  369     -del $(BD)wtest3.exe
  370     -del $(BD)wtest3.ilk
  371     -del $(BD)wtest3.pdb
  372     -del vc70.pdb vc60.pdb vc50.pdb
  373     -del $(OD)lib.rsp
  374     -del $(OD)link.rsp
  375 
  376 
  377 # simple GS interface
  378 SIMPLEOBJ=$(OD)wdll$(OBJ) $(OD)wgsver$(OBJ) \
  379  $(OD)cgsdll$(OBJ) $(OD)cgsdll2$(OBJ)
  380 
  381 
  382 $(OD)cgsdll2$(OBJ): $(SRC)cgsdll2.c $(HDRS)
  383     $(COMP) $(FOO)cgsdll2$(OBJ) $(CO) $(SRC)cgsdll2.c
  384 
  385 $(BD)gssimple.dll: $(SIMPLEOBJ) $(OD)lib.rsp
  386     echo $(SIMPLEOBJ) > $(OD)link.rsp
  387     $(LINK) $(DEBUGLINK) /DLL /OUT:$(BD)gssimple.dll @$(OD)link.rsp @$(OD)lib.rsp
  388 
  389 $(BD)gssimple.exe: $(SIMPLEOBJ) $(OD)lib.rsp
  390     echo $(SIMPLEOBJ) > $(OD)link.rsp
  391     $(LINK) $(DEBUGLINK) /SUBSYSTEM:CONSOLE /OUT:$(BD)gssimple.exe @$(OD)link.rsp @$(OD)lib.rsp