# This file is part of icoformat, a Windows Icon (ICO) File Format # plugin for Adobe Photoshop # Copyright (C) 2002-2014 Toby Thain, toby@telegraphics.com.au # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # NMAKE Makefile # Tested with Visual C++ 2008 Express Edition # http://www.microsoft.com/express/vc/ # and Windows SDK for Windows Server 2008 # http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en # Set environment variables as follows (fix paths for # *your* actual installations and ignore line breaks :) # SET INCLUDE=H:\Microsoft Visual Studio 9.0\VC\include; # C:\Program Files\Microsoft SDKs\Windows\v6.1\Include # SET LIB=H:\Microsoft Visual Studio 9.0\Common7\IDE; # H:\Microsoft Visual Studio 9.0\VC\lib; # C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib # SET PATH=H:\Microsoft Visual Studio 9.0\Common7\IDE; # H:\Microsoft Visual Studio 9.0\VC\bin; # C:\Program Files\Microsoft SDKs\Windows\v6.1\Bin # To do a 64-bit build, # - set LIB to {VC}\lib\amd64;Microsoft SDKs\Windows\v6.1\Lib\x64 # and PATH to {VC}\bin\x86_amd64;{VC}\bin # where {VC} is the vc directory of the Visual Studio distribution. # - add -d_WIN64 to RFLAGS # If building in Windows # ---------------------- # 1) Set the environment variables as follows: In the command prompt window, run # C:\program files (x86)\microsoft visual studio 11.0\vc\VCVARSALL AMD64 # or VCVARSALL X86 for 32 bit build. # 2) Manually build zlib: Change directory to the zlib directory, then # nmake /f win32\makefile.msc # 3) Manually build libpng: Change directory to the libpng directory, then # nmake /f scripts\makefile.vcwin32 # Note that the objects for zlib and libpng built above will be disregarded, # and rebuilt locally. These steps are only to set up header files, etc. EXEC = ICOFormat64 # define location of Photoshop SDK headers PSAPI = ..\pluginsdk\photoshopapi # required libraries (http://www.zlib.net/ & http://www.libpng.org/pub/png/libpng.html) ZLIB = ..\zlib LIBPNG = ..\lpng1614 # If zlib compiles complain about 'missing unistd.h', do a 'make distclean' # in the zlib directory (which will overwrite the faulty zconf.h). # C compiler flags CFLAGS = -O2 -DWIN32 -DWIN_ENV \ -I$(PSAPI)\pica_sp -I$(PSAPI)\photoshop -I$(PSAPI)\general \ -I..\common\adobeplugin -I..\common\tt \ -I$(ZLIB) -I$(LIBPNG) # Note since VS8 it is necessary to link with multithreaded standard lib, using /MT LDFLAGS = /LD /MT user32.lib gdi32.lib # resource compiler flags RFLAGS = -i$(PSAPI)\Photoshop -d_WIN64 ZLIBOBJ = $(ZLIB)\adler32.obj $(ZLIB)\deflate.obj $(ZLIB)\inftrees.obj \ $(ZLIB)\uncompr.obj $(ZLIB)\compress.obj $(ZLIB)\zutil.obj \ $(ZLIB)\crc32.obj $(ZLIB)\inflate.obj $(ZLIB)\inffast.obj \ $(ZLIB)\trees.obj PNGOBJ = $(LIBPNG)\png.obj $(LIBPNG)\pngerror.obj $(LIBPNG)\pngget.obj \ $(LIBPNG)\pngmem.obj $(LIBPNG)\pngpread.obj $(LIBPNG)\pngread.obj \ $(LIBPNG)\pngrio.obj $(LIBPNG)\pngrtran.obj $(LIBPNG)\pngrutil.obj \ $(LIBPNG)\pngset.obj $(LIBPNG)\pngtrans.obj $(LIBPNG)\pngwio.obj \ $(LIBPNG)\pngwrite.obj $(LIBPNG)\pngwtran.obj $(LIBPNG)\pngwutil.obj OBJ = main.obj ico_io.obj read.obj readpng.obj write.obj writepng.obj \ estimate.obj ui.obj ui_win.obj \ ..\common\tt\file_io.obj ..\common\tt\str.obj \ ..\common\tt\ui_compat_win.obj ..\common\tt\dbg_win.obj \ ..\common\tt\file_compat_win.obj \ ..\common\adobeplugin\dllmain.obj ..\common\adobeplugin\dprintf.obj \ $(ZLIBOBJ) $(PNGOBJ) all : $(EXEC).8bi clean : -del *.obj *.asm *.cod plugin.res $(EXEC).8bi $(EXEC).exp $(EXEC).lib $(EXEC).map plugin.res : plugin.rc PiPL.rc PiPL_common.rc ui_win.rc ui.h version.h $(RC) $(RFLAGS) plugin.rc $(EXEC).8bi : $(OBJ) plugin.res $(CC) /Fe$@ $(**F) $(LDFLAGS)