This documents gives hints how to install the dklibs library set
and some applications using these libraries from source.
The C compiler from MS Visual C/MS Visual Studio is used.
Makefiles are used (if possible) to allow building the software on
the command line and to avoid dependency on an exact MS Visual
Studio version.
On my computers I have german versions of MS Windows and MS Visual
Studio available only. For GUI element texts (i.e. menu commands)
this text shows the german text followed by my translation attempt
in brackets (for Net-SNMP). The exact texts depend on MS Windows
version and language and MS Visual Studio version and language.
Source code to build the dklibs library set and some
applications using the libraries can be found in the dklibs-win32
package of the dklibs SourceForge project http://sourceforge.net/projects/dklibs.
In the Download area go to the dklibs-win32 package and get the
file all-*.zip (use the highest available version number).
When using MS Visual C there are different versions of the runtime library available:
File | Purpose | Compiler switch |
---|---|---|
LIBC.LIB | static library, release, single-threaded | /ML |
LIBCD.LIB | static library, debug, single-threaded | /MLd |
LIBCMT.LIB | static library, release, multi-threaded | /MT |
LIBCMTD.LIB | static library, debug, single-threaded | /MTd |
MSVCRT.LIB | DLL, release | /MD |
MSVCRTD.LIB | DLL, debug | /MDd |
The C runtime library version is choosen at compile time using a
compiler switch. Object modules contain information which runtime
library version they are compiled for. The linker inspects the
modules for this information and uses the runtime library version
found.
If some modules were built for different runtime library versions
this will result in conflicts reported by the linker.
To avoid these conflicts we will compile all modules involved in
building an *.exe file - even the modules in libraries - using the
same compiler switch for runtime library selection.
You can build the software using static libraries or DLL
libraries.
For static libraries the LIBCMT.LIB runtime library is used, for
DLLs the MSVCRT.LIB runtime library is used.
I strongly recommend to build and use static libraries
unless you have a good reason (you want to use the Perl XS modules)
and a good knowledge of Windows system administration.
mkdir c:\p mkdir c:\p\lib-stt mkdir c:\p\lib-stt\include mkdir c:\p\lib-stt\lib mkdir c:\p\lib-stt\bin mkdir c:\p\lib-stt\share mkdir c:\p\lib-stt\share\snmp mkdir c:\p\lib-stt\share\snmp\mibs
mkdir c:\p mkdir c:\p\lib-dll mkdir c:\p\lib-dll\include mkdir c:\p\lib-dll\lib mkdir c:\p\lib-dll\bin mkdir c:\p\lib-dll\share mkdir c:\p\lib-dll\share\snmp mkdir c:\p\lib-dll\share\snmp\mibs
Some environment variables (i.e. PATH, INCLUDE and LIBS) must be
set for the C compiler to work properly.
For Visual C 5 open a command prompt window and run
vcvars32
to set the PATH.
For more recent versions of Visual Studio and/or Platform SDK there
is a start menu entry "Visual Studio Tools => Visual Studio ...
Command Prompt" in the Visual Studio program group.
Version 1.2.3 was used while writing this text.
copy win32\makefile.msc makefileand confirm overwriting the existing makefile.
CFLAGS = -nologo -MD -O2 $(LOC)by
CFLAGS = -nologo -MT -O2 $(LOC)
nmake zlib.libto build the static zlib library.
xcopy *.h c:\p\lib-stt\include\ /Y xcopy *.lib c:\p\lib-stt\lib\ /Yto install the library and the header files to c:\p\lib-stt.
xcopy win32\*.def . xcopy win32\makefile.msc makefileand confirm to overwrite the existing makefile.
nmake zdll.libto build the software.
xcopy *.h c:\p\lib-dll\include\ /Y xcopy *.lib c:\p\lib-dll\lib\ /Y xcopy *.dll c:\p\lib-dll\bin\ /Yto install the software to c:\p\lib-dll.
Version 1.0.5 was used while writing this text.
CFLAGS= -DWIN32 -MD -Ox -D_FILE_OFFSET_BITS=64 -nologoby
CFLAGS= -DWIN32 -MT -Ox -D_FILE_OFFSET_BITS=64 -nologo
nmake -f makefile.msc libto build the software.
xcopy *.lib c:\p\lib-stt\lib\ /Y xcopy *.h c:\p\lib-stt\include\ /Yto install the library and the header files to c:\p\lib-stt.
lib: $(OBJS) lib /out:libbz2.lib $(OBJS)by
lib: $(OBJS) link /dll /def:libbz2.def /out:libbz2.dll /implib:libbz2.lib $(OBJS)
DESCRIPTION "libbzip2: library for data compression"
nmake -f makefile.msc libto build the software.
xcopy *.h c:\p\lib-dll\include\ /Y xcopy *.lib c:\p\lib-dll\lib\ /Y xcopy *.dll c:\p\lib-dll\bin\ /Yto install the library to c:\p\lib-dll.
Version 1.2.32 was used while writing this text.
copy scripts\makefile.msc makefileto get the makefile in place.
MODEL=L CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlibby
CFLAGS=/nologo /MT /W3 -Ic:\p\lib-stt\include
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) del libpng.lib lib libpng $(OBJS1); lib libpng $(OBJS2); lib libpng $(OBJS3);by
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) del libpng.lib LIB /out:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3)
#include "zlib.h"by
#include <zlib.h>
nmake libpng.libto build the library
xcopy *.lib c:\p\lib-stt\lib\ /Y xcopy *.h c:\p\lib-stt\include\ /Yto install the library and the header files to c:\p\lib-stt.
copy scripts\makefile.msc makefile copy scripts\pngw32.def .to get the makefile in place.
MODEL=L CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlibby
CFLAGS=/nologo /MD /W3 -Ic:\p\lib-dll\include
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) del libpng.lib lib libpng $(OBJS1); lib libpng $(OBJS2); lib libpng $(OBJS3);by
libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3) del libpng.lib LINK /dll /release /out:libpng.dll /def:pngw32.def /implib:libpng.lib $(OBJS1) $(OBJS2) $(OBJS3) c:\p\lib-dll\lib\zdll.lib
#include "zlib.h"by
#include <zlib.h>
nmake libpng.libto build the DLL and the import library.
xcopy *.lib c:\p\lib-dll\lib\ /Y xcopy *.h c:\p\lib-dll\include\ /Y xcopy *.dll c:\p\lib-dll\bin\ /Yto install library, DLL and header files to c:\p\lib-dll.
The JPEG library source version 6b was used while writing this text.
copy makefile.vc makefile copy jconfig.vc jconfig.hto get makefile and configuration header file in place.
!include <win32.mak>
CFLAGS= $(cflags) $(cdebug) $(cvars) -I.by
CC=CL cc=CL CFLAGS= /nologo /MT /O2 -D_X86_=1 -DWIN32 -D_WIN32 -D_WINNT -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -DNDEBUG -I. -c
nmake libjpeg.libto build the library.
xcopy *.lib c:\p\lib-stt\lib\ /Y xcopy *.h c:\p\lib-stt\include\ /Yto install the library and the header files to c:\p\lib-stt.
copy makefile.vc makefile copy jconfig.vc jconfig.hto get makefile and configuration header file in place.
!include <win32.mak>
CFLAGS= $(cflags) $(cdebug) $(cvars) -I.by
CC=CL cc=CL CFLAGS= /nologo /MD /O2 -D_X86_=1 -DWIN32 -D_WIN32 -D_WINNT -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0500 -DWINVER=0x0500 -DNDEBUG -I. -c
libjpeg.lib: $(LIBOBJECTS) $(RM) libjpeg.lib lib -out:libjpeg.lib $(LIBOBJECTS)by
libjpeg.lib: $(LIBOBJECTS) $(RM) libjpeg.lib LINK /dll /release /out:libjpeg.dll /def:jpeg.def /implib:libjpeg.lib $(LIBOBJECTS)
LIBRARY LIBJPEG EXPORTS jpeg_std_error jpeg_CreateCompress jpeg_CreateDecompress jpeg_stdio_src jpeg_read_header jpeg_start_decompress jpeg_abort jpeg_read_scanlines jpeg_finish_decompress jpeg_destroy_decompress jpeg_abort jpeg_set_defaults jpeg_set_colorspace jpeg_set_quality jpeg_suppress_tables jpeg_start_compress jpeg_write_scanlines jpeg_write_raw_data jpeg_write_tables jpeg_finish_compress jpeg_read_raw_data jpeg_destroy jpeg_resync_to_restart jpeg_write_marker jpeg_destroy_compress jpeg_simple_progression jpeg_save_markers
nmake libjpeg.libto build the library.
xcopy *.lib c:\p\lib-dll\lib\ /Y xcopy *.h c:\p\lib-dll\include\ /Y xcopy *.dll c:\p\lib-dll\bin\ /Yto install the library, the DLL and the header files to c:\p\lib-dll.
Version 10.11.10 from the super stable branch was used while
writing this text.
This version is several years old. I failed to compile the recent
version 10.26.57 unsing MSVC, so I have gone back to a version
known to compile. [2008-10-22]
#include <unistd.h>
copy util\* .Do not overwrite existing files!
#include "compile.h"
char *rindex(char *s, int c) { char *back = NULL, *ptr = NULL; ptr = s; while(*ptr) { if(*ptr == c) { back = ptr; } ptr++; } return back; }
#include <io.h> #include <process.h> #include <stdlib.h> static int S_ISREG(int m) { int back = 0; if((m & _S_IFMT) == _S_IFREG) { back = 1; } return back; }
# Where do you want to install the software? PREFIX=c:\p\lib-stt # Which programs to use for compiling and linking? CC=CL LD=LINK # Where is Visual C? # Directories lib, include and bin must be beyound this. VC=C:\Programme\Microsoft Visual Studio 8\VC all: lib install: all -mkdir $(PREFIX) -mkdir $(PREFIX)\include -mkdir $(PREFIX)\lib -mkdir $(PREFIX)\bin xcopy *.h $(PREFIX)\include\ xcopy ..\*.h $(PREFIX)\include\ xcopy *.lib $(PREFIX)\lib\ clean: -del *.obj -del *.lib -del *.exe -del *.dll lib: netpbm.lib OBJS= libpm.obj bitio.obj colorname.obj \ libpbm1.obj libpbm2.obj libpbm3.obj libpbm4.obj libpbm5.obj \ libpgm1.obj libpgm2.obj \ libppm1.obj libppm2.obj libppmcmap.obj libppm4.obj libppm5.obj \ libppmfloyd.obj \ libpnm1.obj libpnm2.obj libpnm3.obj \ libpam.obj libpammap.obj nstring.obj shhopt.obj netpbm.lib: $(OBJS) lib /nologo /out:netpbm.lib $(OBJS) COBJFLAGS= /nologo /MT /W3 /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /I. /I.. /I"$(VC)\Include" $(SCD) $(DEFS) .c.obj: $(CC) $(COBJFLAGS) /c $*.c
VC=...line. The variable value must be your Visual C/Visual Studio directory. The name depends on Windows version and language and MSVC version and language.
-D_CRT_SECURE_NO_WARNINGS=1to the
COBJFLAGS=...line (append at the end of the line).
nmake -f makefile.mscto build the library.
xcopy *.lib c:\p\lib-stt\lib\ /Y xcopy *.h c:\p\lib-stt\include\ /Yto install the library and the header files to c:\p\lib-stt.
#include <unistd.h>
copy util\* .Do not overwrite existing files!
#include "compile.h"
char *rindex(char *s, int c) { char *back = NULL, *ptr = NULL; ptr = s; while(*ptr) { if(*ptr == c) { back = ptr; } ptr++; } return back; }
#include <io.h> #include <process.h> #include <stdlib.h> static int S_ISREG(int m) { int back = 0; if((m & _S_IFMT) == _S_IFREG) { back = 1; } return back; }
# Where do you want to install the software? PREFIX=c:\p\lib-dll # Which programs to use for compiling and linking? CC=CL LD=LINK # Where is Visual C? # Directories lib, include and bin must be beyound this. VC=C:\Programme\Microsoft Visual Studio 8\VC all: lib install: all -mkdir $(PREFIX) -mkdir $(PREFIX)\include -mkdir $(PREFIX)\lib -mkdir $(PREFIX)\bin xcopy *.h $(PREFIX)\include\ xcopy ..\*.h $(PREFIX)\include\ xcopy *.lib $(PREFIX)\lib\ clean: -del *.obj -del *.lib -del *.exe -del *.dll lib: netpbm.lib OBJS= libpm.obj bitio.obj colorname.obj \ libpbm1.obj libpbm2.obj libpbm3.obj libpbm4.obj libpbm5.obj \ libpgm1.obj libpgm2.obj \ libppm1.obj libppm2.obj libppmcmap.obj libppm4.obj libppm5.obj \ libppmfloyd.obj \ libpnm1.obj libpnm2.obj libpnm3.obj \ libpam.obj libpammap.obj nstring.obj shhopt.obj netpbm.lib: $(OBJS) LINK /dll /release /out:netpbm.dll /def:netpbm.def /implib:netpbm.lib $(OBJS) COBJFLAGS= /nologo /MD /W3 /O2 /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_CONSOLE" /FD /I. /I.. /I"$(VC)\Include" $(SCD) $(DEFS) -D_CRT_SECURE_NO_WARNINGS=1 .c.obj: $(CC) $(COBJFLAGS) /c $*.c
LIBRARY NETPBM EXPORTS asnprintfN asprintfN createBlackTuple mk_argvn optParseOptions optParseOptions2 optParseOptions3 optSetFatalFunc pam_colorname pbm_check pbm_defaultfont pbm_dissectfont pbm_dumpfont pbm_getc pbm_getint pbm_getrawbyte pbm_init pbm_loadbdffont pbm_loadfont pbm_loadpbmfont pbm_nextimage pbm_readpbm pbm_readpbminit pbm_readpbminitrest pbm_readpbmrow pbm_readpbmrow_packed pbm_writepbm pbm_writepbminit pbm_writepbmrow pbm_writepbmrow_packed pgm_check pgm_getrawsample pgm_init pgm_nextimage pgm_readpgm pgm_readpgminit pgm_readpgminitrest pgm_readpgmrow pgm_writepgm pgm_writepgminit pgm_writepgmrow pgm_writerawsample pm_allocarray pm_allocrow pm_arg0toprogname pm_bitfini pm_bitinit pm_bitread pm_bitstomaxval pm_bitwrite pm_canonstr pm_check pm_close pm_closer pm_closew pm_colorget pm_error pm_freearray pm_freerow pm_init pm_keymatch pm_lcm pm_maxvaltobits pm_message pm_nextimage pm_openColornameFile pm_openr pm_openr_seekable pm_openw pm_perror pm_proginit pm_read_unknown_size pm_readbiglong pm_readbigshort pm_readlittlelong pm_readlittleshort pm_readmagicnumber pm_rgbnorm pm_seek pm_setMessage pm_tell pm_usage pm_writebiglong pm_writebigshort pm_writelittlelong pm_writelittleshort pnm_YCbCrtuple pnm_addtotuplehash pnm_allocpamarray pnm_allocpamrow pnm_alloctupletable pnm_assigntuple pnm_backgroundxel pnm_backgroundxelrow pnm_blackxel pnm_check pnm_checkpam pnm_computetuplefreqhash pnm_computetuplefreqtable pnm_computetupletablehash pnm_createtuplehash pnm_destroytuplehash pnm_freepamarray pnm_freetupletable pnm_hashtuple pnm_init pnm_invertxel pnm_lookuptuple pnm_nextimage pnm_promoteformat pnm_promoteformatrow pnm_readpam pnm_readpaminit pnm_readpamrow pnm_readpnm pnm_readpnminit pnm_readpnmrow pnm_scaletuple pnm_scaletuplerow pnm_setpamrow pnm_tupleequal pnm_tuplehashtotable pnm_whitexel pnm_writepam pnm_writepaminit pnm_writepamrow pnm_writepnm pnm_writepnminit pnm_writepnmrow ppm_addtocolorhash ppm_addtocolorhist ppm_addtocolorrow ppm_alloccolorhash ppm_check ppm_colorhashtocolorhist ppm_colorhisttocolorhash ppm_colorname ppm_colorrowtocolorhash ppm_colorrowtomapfile ppm_computecolorhash ppm_computecolorhash2 ppm_computecolorhist ppm_computecolorhist2 ppm_computecolorrow ppm_findclosestcolor ppm_freecolorhash ppm_freecolorhist ppm_fs_endrow ppm_fs_free ppm_fs_init ppm_fs_next ppm_fs_startrow ppm_fs_update ppm_fs_update3 ppm_init ppm_lookupcolor ppm_mapfiletocolorrow ppm_nextimage ppm_parsecolor ppm_readppm ppm_readppminit ppm_readppminitrest ppm_readppmrow ppm_sortcolorrow ppm_writeppm ppm_writeppminit ppm_writeppmrow ppmd_circle ppmd_fill ppmd_fill_drawproc ppmd_fill_init ppmd_filledrectangle ppmd_line ppmd_point_drawproc ppmd_polyspline ppmd_setlineclip ppmd_setlinetype ppmd_spline3 ppmd_text ppmd_text_box snprintfN strfree stripeq vasnprintfN vasprintfN vsnprintfN xeltopixel
VC=...line. The variable value must be your Visual C/Visual Studio directory. The name depends on Windows version and language and MSVC version and language.
-D_CRT_SECURE_NO_WARNINGS=1to the
COBJFLAGS=...line (append at the end of the line).
nmake -f makefile.mscto build the library.
xcopy *.lib c:\p\lib-dll\lib\ /Y xcopy *.dll c:\p\lib-dll\bin\ /Y xcopy *.h c:\p\lib-dll\include\ /Yto install the library and the header files to c:\p\lib-dll.
Version 3.8.2 was used while writing this text.
#JPEG_SUPPORT = 1 #JPEGDIR = d:/projects/jpeg-6b #JPEG_INCLUDE = -I$(JPEGDIR) #JPEG_LIB = $(JPEGDIR)/Release/jpeg.libby
JPEG_SUPPORT = 1 JPEGDIR = c:/p/lib-stt JPEG_INCLUDE = -I$(JPEGDIR)/include JPEG_LIB = $(JPEGDIR)/lib/libjpeg.lib
#ZIP_SUPPORT = 1 #ZLIBDIR = d:/projects/zlib-1.2.1 #ZLIB_INCLUDE = -I$(ZLIBDIR) #ZLIB_LIB = $(ZLIBDIR)/zlib.libby
ZIP_SUPPORT = 1 ZLIBDIR = c:/p/lib-stt ZLIB_INCLUDE = -I$(ZLIBDIR)/include ZLIB_LIB = $(ZLIBDIR)/lib/zlib.lib
#PIXARLOG_SUPPORT = 1by
PIXARLOG_SUPPORT = 1
OPTFLAGS = /Ox /MD /GX /W3by
OPTFLAGS = /Ox /MT /W3 -D_CRT_SECURE_NO_WARNINGS=1
nmake -f makefile.vc libtiff.libto build the library.
xcopy *.h c:\p\lib-stt\include\ /Y xcopy *.lib c:\p\lib-stt\lib\ /Yto install the library and the header files into c:\p\lib-stt.
#JPEG_SUPPORT = 1 #JPEGDIR = d:/projects/jpeg-6b #JPEG_INCLUDE = -I$(JPEGDIR) #JPEG_LIB = $(JPEGDIR)/Release/jpeg.libby
JPEG_SUPPORT = 1 JPEGDIR = c:/p/lib-dll JPEG_INCLUDE = -I$(JPEGDIR)/include JPEG_LIB = $(JPEGDIR)/lib/libjpeg.lib
#ZIP_SUPPORT = 1 #ZLIBDIR = d:/projects/zlib-1.2.1 #ZLIB_INCLUDE = -I$(ZLIBDIR) #ZLIB_LIB = $(ZLIBDIR)/zlib.libby
ZIP_SUPPORT = 1 ZLIBDIR = c:/p/lib-dll ZLIB_INCLUDE = -I$(ZLIBDIR)/include ZLIB_LIB = $(ZLIBDIR)/lib/zdll.lib
#PIXARLOG_SUPPORT = 1by
PIXARLOG_SUPPORT = 1
OPTFLAGS = /Ox /MD /GX /W3by
OPTFLAGS = /Ox /MD /W3 -D_CRT_SECURE_NO_WARNINGS=1
$(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ) $(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \ /implib:libtiff_i.lib $(OBJ) $(LIBS)by
$(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ) $(LD) /release /dll /def:libtiff.def /out:$(DLLNAME) \ /implib:libtiff_i.lib $(OBJ) $(LIBS)
nmake -f makefile.vc libtiff.dllto build the library.
xcopy *.h c:\p\lib-dll\include\ /Y xcopy *.lib c:\p\lib-dll\lib\ /Y xcopy *.dll c:\p\lib-dll\bin\ /Yto install the library and the header files into c:\p\lib-dll.
Version 0.9.8i was used while writing this text.
perl Configure VC-WIN32 --prefix=c:/p/lib-stt ms\do_masm nmake -f ms\nt.mak nmake -f ms\nt.mak installto configure, build and install the software.
perl Configure VC-WIN32 --prefix=c:/p/lib-dll ms\do_masm nmake -f ms\ntdll.mak nmake -f ms\ntdll.mak installto configure, build and install the software.
Visual Studio 2005 was used while writing this text.
perl Configure --config=release --linktype=static --prefix="c:/p/lib-stt" --with-sslIf you do not have OpenSSL installed in c:\p\lib-stt do not use "--with-ssl".
xcopy win32\lib\release\*.lib c:\p\lib-stt\lib\ /Y xcopy include\net-snmp\*.h c:\p\lib-stt\include\net-snmp\ /Y /E /S xcopy include\ucd-snmp\*.h c:\p\lib-stt\include\ucd-snmp\ /Y /E /S xcopy win32\net-snmp\*.h c:\p\lib-stt\include\net-snmp\ /Y /E /S xcopy mibs\* \c:\p\lib-stt\share\snmp\mibs\ /S /Y /E
typedef unsigned short mode_t;
perl Configure --config=release --linktype=dynamic --prefix="c:/p/lib-dll" --with-sslIf you do not have OpenSSL installed in c:\p\lib-dll do not use "--with-ssl".
snmp_enable_filelogadd
snmp_disable_filelog netsnmp_enable_filelog
xcopy win32\lib\release\*.lib c:\p\lib-dll\lib\ /Y xcopy include\net-snmp\*.h c:\p\lib-dll\include\net-snmp\ /Y /E /S xcopy include\ucd-snmp\*.h c:\p\lib-dll\include\ucd-snmp\ /Y /E /S xcopy win32\net-snmp\*.h c:\p\lib-dll\include\net-snmp\ /Y /E /S xcopy win32\bin\release\*.dll c:\p\lib-dll\bin\ /Y /E /S xcopy mibs\* c:\p\lib-dll\share\snmp\mibs\ /S /Y /E
typedef unsigned short mode_t;
After unpacking all-*.zip change into the all subdirectory of
the source package.
Edit either all-stt.mak if you want to build and use static
libraries or all-dll.mak if you want to build and use DLLs.
# ### IF YOU DO NOT HAVE BZ2LIB, TOGGLE THIS SECTION # -------------------------------------------------- # BZL_DEF=-DHAVE_BZLIB_H=0 # BZL_DIR= # BZL_LIB= BZL_DEF=-DHAVE_BZLIB_H=1 BZL_DIR=-I$(LIBSRC)\Include BZL_LIB=libbz2.libby
# ### IF YOU DO NOT HAVE BZ2LIB, TOGGLE THIS SECTION # -------------------------------------------------- BZL_DEF=-DHAVE_BZLIB_H=0 BZL_DIR= BZL_LIB= # BZL_DEF=-DHAVE_BZLIB_H=1 # BZL_DIR=-I$(LIBSRC)\Include # BZL_LIB=libbz2.lib
# ### IF YOU DO NOT HAVE ZLIB, TOGGLE THIS SECTION # ------------------------------------------------ # ZL_DEF=-DHAVE_ZLIB_H=0 # ZL_DIR= # ZL_LIB= ZL_DEF=-DHAVE_ZLIB_H=1 ZL_DIR=-I$(LIBSRC)\Include ZL_LIB=zlib.libby
# ### IF YOU DO NOT HAVE ZLIB, TOGGLE THIS SECTION # ------------------------------------------------ ZL_DEF=-DHAVE_ZLIB_H=0 ZL_DIR= ZL_LIB= # ZL_DEF=-DHAVE_ZLIB_H=1 # ZL_DIR=-I$(LIBSRC)\Include # ZL_LIB=zlib.lib
# PNGLIB requires ZLIB! # --------------------- # PNG_DEF=-DHAVE_LIBPNG=0 -DHAVE_PNG_H=0 PNG_DEF=-DHAVE_LIBPNG=1 -DHAVE_PNG_H=1 PNG_DIR=-I$(LIBSRC)\Include PNG_LIB=libpng.lib PNGEPSOBJ=pngeps.obj BMEPSEXE=bmeps.exeby
# PNGLIB requires ZLIB! # --------------------- PNG_DEF=-DHAVE_LIBPNG=0 -DHAVE_PNG_H=0 # PNG_DEF=-DHAVE_LIBPNG=1 -DHAVE_PNG_H=1 # PNG_DIR=-I$(LIBSRC)\Include # PNG_LIB=libpng.lib # PNGEPSOBJ=pngeps.obj # BMEPSEXE=bmeps.exe
# JPEGLIB # ------- # JPG_DEF=-DHAVE_JPEGLIB_H=0 JPG_DEF=-DHAVE_JPEGLIB_H=1 JPG_DIR=-I$(LIBSRC)\Include JPG_LIB=libjpeg.lib JPGEPSOBJ=jpgeps.objby
# JPEGLIB # ------- JPG_DEF=-DHAVE_JPEGLIB_H=0 # JPG_DEF=-DHAVE_JPEGLIB_H=1 # JPG_DIR=-I$(LIBSRC)\Include # JPG_LIB=libjpeg.lib # JPGEPSOBJ=jpgeps.obj
# TIFFLIB - maybe after June 2003 # TIF_DEF=-DHAVE_TIFF_H=0 TIF_DEF=-DHAVE_TIFF_H=1 TIF_DIR=-I$(LIBSRC)\Include TIF_LIB=libtiff.lib TIFEPSOBJ=tifeps.objby
# TIFFLIB - maybe after June 2003 TIF_DEF=-DHAVE_TIFF_H=0 # TIF_DEF=-DHAVE_TIFF_H=1 # TIF_DIR=-I$(LIBSRC)\Include # TIF_LIB=libtiff.lib # TIFEPSOBJ=tifeps.obj
# NETPBM # ------ # PNM_DEF=-DHAVE_PNM_H=0 # PNM_DLL=netpbm.dll PNM_DEF=-DHAVE_PNM_H=1 PNM_DIR=-I$(LIBSRC)\Include PNM_LIB=$(LIBSRC)\Lib\netpbm.lib PNM_DLL=$(LIBSRC)\Bin\netpbm.dll PNMEPSOBJ=pnmeps.objby
# NETPBM # ------ PNM_DEF=-DHAVE_PNM_H=0 PNM_DLL=netpbm.dll # PNM_DEF=-DHAVE_PNM_H=1 # PNM_DIR=-I$(LIBSRC)\Include # PNM_LIB=$(LIBSRC)\Lib\netpbm.lib # PNM_DLL=$(LIBSRC)\Bin\netpbm.dll # PNMEPSOBJ=pnmeps.obj
# OpenSSL # ------- # CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=0 -DHAVE_OPENSSL_SHA_H=0 # CRYPTO_DLL= # CRYPTO_LIB= # CRYPTO_DIR= # CRYPTO_CP1=echo No need for $(LIBSRC)\Bin\LIBEAY32.DLL # CRYPTO_CP2=echo No need for $(LIBSRC)\Bin\SSLEAY32.DLL CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=1 -DHAVE_OPENSSL_SHA_H=1 -DHAVE_OPENSSL_RAND_H=1 CRYPTO_DLL=$(LIBSRC)\Bin\LIBEAY32.DLL $(LIBSRC)\Bin\SSLEAY32.DLL CRYPTO_LIB=$(LIBSRC)\LIB\LIBEAY32.LIB $(LIBSRC)\LIB\SSLEAY32.LIB CRYPTO_DIR=-I$(LIBSRC)\Include CRYPTO_CP1=xcopy $(LIBSRC)\Bin\LIBEAY32.DLL $(PREFIX)\bin CRYPTO_CP2=xcopy $(LIBSRC)\Bin\SSLEAY32.DLL $(PREFIX)\binby
# OpenSSL # ------- CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=0 -DHAVE_OPENSSL_SHA_H=0 CRYPTO_DLL= CRYPTO_LIB= CRYPTO_DIR= CRYPTO_CP1=echo No need for $(LIBSRC)\Bin\LIBEAY32.DLL CRYPTO_CP2=echo No need for $(LIBSRC)\Bin\SSLEAY32.DLL # CRYPTO_DEF=-DHAVE_OPENSSL_MD5_H=1 -DHAVE_OPENSSL_SHA_H=1 -DHAVE_OPENSSL_RAND_H=1 # CRYPTO_DLL=$(LIBSRC)\Bin\LIBEAY32.DLL $(LIBSRC)\Bin\SSLEAY32.DLL # CRYPTO_LIB=$(LIBSRC)\LIB\LIBEAY32.LIB $(LIBSRC)\LIB\SSLEAY32.LIB # CRYPTO_DIR=-I$(LIBSRC)\Include # CRYPTO_CP1=xcopy $(LIBSRC)\Bin\LIBEAY32.DLL $(PREFIX)\bin # CRYPTO_CP2=xcopy $(LIBSRC)\Bin\SSLEAY32.DLL $(PREFIX)\bin
# NET-SNMP # -------- # SNMP_DEF=-DHAVE_LIBNETSNMP=0 -DHAVE_LIBUCDSNMP=0 # SNMP_DLL=netsnmp.dll # SNMP_DIR= # SNMP_LIB= # SNMPYALC= SNMPYALC=snmpyalc.exe klpinfo.exe SNMP_DEF=-DHAVE_LIBNETSNMP=1 -DHAVE_LIBUCDSNMP=0 -DNDEBUG -D_WINDOWS -DHAVE_MODE_T=1 SNMP_DIR=-I$(LIBSRC)\Include SNMP_LIB=$(LIBSRC)\Lib\netsnmp.lib $(CRYPTO_LIB) SNMP_DLL=$(LIBSRC)\Bin\netsnmp.dll SNMP_LOG=-DHAVE_HORRIBLE_NETSNMP_LOGGING=1by
# NET-SNMP # -------- SNMP_DEF=-DHAVE_LIBNETSNMP=0 -DHAVE_LIBUCDSNMP=0 SNMP_DLL=netsnmp.dll SNMP_DIR= SNMP_LIB= SNMPYALC= # SNMPYALC=snmpyalc.exe klpinfo.exe # SNMP_DEF=-DHAVE_LIBNETSNMP=1 -DHAVE_LIBUCDSNMP=0 -DNDEBUG -D_WINDOWS -DHAVE_MODE_T=1 # SNMP_DIR=-I$(LIBSRC)\Include # SNMP_LIB=$(LIBSRC)\Lib\netsnmp.lib $(CRYPTO_LIB) # SNMP_DLL=$(LIBSRC)\Bin\netsnmp.dll # SNMP_LOG=-DHAVE_HORRIBLE_NETSNMP_LOGGING=1
Run
nmake -f all-stt.mak
Run
nmake -f all-stt.mak install
to install the software to c:\programme\krause (or whatever you
specified as PREFIX in the makefile).
Run
c:\programme\krause\bin\dkwftreg.exe c:\programme\krause
to add c:\programme\krause\bin to the PATH environment variable and register context menu entries for Windows explorer.
The contents of my c:\krause\bindist directory is included in
the sources for completeness. You can use the files here to produce
your own executable setup files, but this is optional.
The directory contains:
If you want to build customized executable setup files I recommend to to use these examples as a starting point. Feel free to customize these files as needed.
Before you use this directories contents create the following directories on your computer:
move src all zip -q -r -9 all-1.2.14 allMove all-1.2.14.zip to c:\shares\forunix (for later versions the version number will vary).