# This file is part of WebPFormat, a File Format plugin for Adobe Photoshop # Copyright (C) 2010-2013 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 # IMPORTANT: To define build architecture, uncomment ONE SET # of definitions immediately below. # If you have problems, it may be necessary to: # $ make -f Makefile.wine realclean # $ wine nmake /f nmake.mak clean # and try rebuilding: # $ wine nmake /f nmake.mak # If all else fails, contact the author, # For 32-bit: ----------------------- LIBWEBP_ARCH = x86 # For 64-bit: ----------------------- # To do a 64-bit build, your toolchain environment must be set up: # - set LIB to {VC}\lib\amd64;Microsoft SDKs\Windows\v6.1\Lib\x64 # - set PATH to {VC}\bin\x86_amd64;{VC}\bin # where {VC} is the vc directory of the Visual Studio distribution. #LIBWEBP_ARCH = x64 #RFLAGS_ARCH = -d_WIN64 #VPXEXTRA_ARCH = loopfilter_block_sse2.obj # ----------------------------------- EXEC = WebPFormat # define location of Photoshop SDK headers PSAPI = "..\adobe_photoshop_cs5_sdk_win\photoshopapi" # The following list of object files is produced by target 'make vpxobj' # in Makefile.wine. The object files themselves are built by the 'all' # target in that Makefile. VPXOBJ = vpx_decoder.obj vpx_encoder.obj vpx_codec.obj vpx_image.obj vpx_mem.obj vpxscale.obj yv12config.obj yv12extend.obj x86_cpuid.obj alloccommon.obj asm_com_offsets.obj blockd.obj debugmodes.obj dequantize.obj entropy.obj entropymode.obj entropymv.obj extend.obj filter.obj findnearmv.obj systemdependent.obj idct_blk.obj idctllm.obj rtcd.obj loopfilter.obj loopfilter_filters.obj mbpitch.obj modecont.obj quant_common.obj reconinter.obj reconintra.obj reconintra4x4.obj sad_c.obj setupintrarecon.obj swapyv12buffer.obj variance_c.obj treecoder.obj filter_x86.obj vp8_asm_stubs.obj loopfilter_x86.obj mfqe.obj postproc.obj idct_blk_mmx.obj variance_mmx.obj idct_blk_sse2.obj recon_wrapper_sse2.obj variance_sse2.obj variance_ssse3.obj postproc_x86.obj vp8_cx_iface.obj asm_enc_offsets.obj bitstream.obj boolhuff.obj dct.obj encodeframe.obj encodeintra.obj encodemb.obj encodemv.obj firstpass.obj denoising.obj lookahead.obj mcomp.obj modecosts.obj onyx_if.obj pickinter.obj picklpf.obj psnr.obj quantize.obj ratectrl.obj rdopt.obj segmentation.obj tokenize.obj treewriter.obj temporal_filter.obj vp8_enc_stubs_mmx.obj denoising_sse2.obj vp8_enc_stubs_sse2.obj vp8_dx_iface.obj asm_dec_offsets.obj dboolhuff.obj decodemv.obj decodframe.obj detokenize.obj onyxd_if.obj vpx_config.obj emms.obj x86_abi_support.obj dequantize_mmx.obj idctllm_mmx.obj iwalsh_mmx.obj loopfilter_mmx.obj recon_mmx.obj sad_mmx.obj subpixel_mmx.obj variance_impl_mmx.obj idctllm_sse2.obj recon_sse2.obj sad_sse2.obj subpixel_sse2.obj loopfilter_sse2.obj iwalsh_sse2.obj variance_impl_sse2.obj sad_sse3.obj sad_ssse3.obj subpixel_ssse3.obj variance_impl_ssse3.obj sad_sse4.obj postproc_mmx.obj mfqe_sse2.obj postproc_sse2.obj dct_mmx.obj subtract_mmx.obj dct_sse2.obj fwalsh_sse2.obj quantize_sse2.obj subtract_sse2.obj temporal_filter_apply_sse2.obj quantize_ssse3.obj quantize_sse4.obj quantize_mmx.obj encodeopt.obj # This seems to be missing from the generated vcproj. Could be an upstream bug. VPXEXTRA = libvpx/vpx_scale/generic/gen_scalers.obj LIBWEBP_LIB = obj\release-static\$(LIBWEBP_ARCH)\lib\libwebp.lib CFLAGS = -O2 -DWIN32 -DWIN_ENV -D_USE_MATH_DEFINES \ -I$(PSAPI)\Pica_sp -I$(PSAPI)\Photoshop -I$(PSAPI)\General \ -I..\common\adobeplugin -I..\common\tt \ -Ilibvpx -Ilibwebp # 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 -i$(PSAPI)\pica_sp -dWIN32 -dWIN_ENV OBJ = main.obj main_lossless.obj read.obj decode.obj \ write.obj encode.obj scripting.obj ui.obj ui_win.obj \ ..\common\tt\str.obj \ ..\common\tt\file_io.obj \ ..\common\tt\ui_compat_win.obj \ ..\common\tt\dbg_win.obj \ ..\common\tt\file_compat_win.obj \ ..\common\adobeplugin\dllmain.obj \ $(VPXOBJ) $(VPXEXTRA) $(VPXEXTRA_ARCH) all : $(EXEC).8bi clean : -del $(OBJ) PiPL.res $(EXEC).8bi $(EXEC).exp $(EXEC).lib PiPL.res : PiPL.rc scripting.rc ui_win.rc version.rc ui_defs.h version.h $(RC) $(RFLAGS) $(RFLAGS_ARCH) PiPL.rc $(EXEC).8bi : $(OBJ) PiPL.res $(CC) /Fe$@ $(**F) $(LIBWEBP_LIB) $(LDFLAGS)