summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8916752)
raw | patch | inline | side by side (parent: 8916752)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 13 Aug 2006 16:40:17 +0000 (16:40 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Sun, 13 Aug 2006 16:40:17 +0000 (16:40 +0000) |
program/src/Makefile.NetWare | patch | blob | history | |
program/src/Makefile.Win32 | patch | blob | history |
index 15f7c393c6610b76f958eab6031a5cbd0484c6d1..0f655f5a1f61dfd18c95cffab0a6f86d0b9e3eaf 100644 (file)
-# Gnu Makefile for NetWare target * 11-Jul-2006\r
-# for use with gcc/nlmconv or Metrowerks CodeWarrior compiler\r
-# use with: make -f Makefile.NetWare [all|clean|dist|distclean]\r
-\r
-DESCR = Round Robin Database Tool $(RRD_VERSION_STR)\r
-COPYR = Copyright (c) 1997-2006 by Tobias Oetiker\r
-#WWWURL = http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/\r
-WWWURL = http://www.rrdtool.org/\r
-MTSAFE = YES\r
-#SCREEN = $(DESCR)\r
-STACK = 65535\r
-# Comment the line below if you dont want to load protected automatically.\r
-#LDRING = 3\r
-\r
-# Set the default font used in graphs.\r
-ifndef RRD_DEFAULT_FONT\r
-#RRD_DEFAULT_FONT = "sys:/java/nwgfx/lib/x11/fonts/ttf/tt0003m_.ttf"\r
-#RRD_DEFAULT_FONT = "DejaVuSansMono-Roman.ttf"\r
-RRD_DEFAULT_FONT = "VeraMono.ttf"\r
-endif\r
-\r
-# Vertical label angle: 90.0 (default) or 270.0\r
-RRDGRAPH_YLEGEND_ANGLE = 90.0\r
-\r
-# Set to one if you want to have piecharts.\r
-WITH_PIECHART = 1\r
-\r
-# Set the extension used for rrdcgi.\r
-ifndef CGIEXT\r
-CGIEXT = nlm\r
-endif\r
-\r
-# Edit the path below to point to your Novell NDK.\r
-ifndef NDKBASE\r
-NDKBASE = c:/novell\r
-endif\r
-\r
-# Base for the lib sources\r
-ifndef LIBBASE\r
-LIBBASE = ../..\r
-endif\r
-# All library code is statically linked to avoid problems with other lib NLMs. \r
-# Edit the path below to point to your libpng sources or set environment var.\r
-ifndef LIBPNG\r
-LIBPNG = $(LIBBASE)/libpng-1.2.10\r
-endif\r
-# Edit the path below to point to your freetype sources or set environment var.\r
-ifndef LIBFT2\r
-LIBFT2 = $(LIBBASE)/freetype-2.1.10\r
-endif\r
-# Edit the path below to point to your freetype sources or set environment var.\r
-ifndef LIBART\r
-LIBART = $(LIBBASE)/libart_lgpl-2.3.17\r
-endif\r
-# Edit the path below to point to your zlib sources or set environment var.\r
-ifndef ZLIBSDK\r
-ZLIBSDK = $(LIBBASE)/zlib-1.2.3\r
-endif\r
-\r
-# Edit the path below to point to your distribution folder.\r
-ifndef DISTDIR\r
-DISTDIR = rrdtool-$(RRD_VERSION_STR)-nw\r
-endif\r
-ARCHIVE = $(DISTDIR).zip\r
-\r
-# whatever...\r
-# NO_NULL_REALLOC = 1\r
-\r
-# Edit the var below to point to your lib architecture.\r
-ifndef LIBARCH\r
-# LIBARCH = CLIB\r
-LIBARCH = LIBC\r
-endif\r
-\r
-# The following line defines your compiler.\r
-ifdef METROWERKS\r
- CC = mwccnlm\r
-else\r
- CC = gcc\r
-endif\r
-# RM = rm -f\r
-CP = cp -afv\r
-# if you want to mark the target as MTSAFE you will need a tool for\r
-# generating the xdc data for the linker; here's a minimal tool:\r
-# http://www.gknw.com/development/prgtools/mkxdc.zip\r
-MPKXDC = mkxdc\r
-# CodeWarrior is too stupid to set the internal name properly when\r
-# the extension is not a NLM and not a registered type. So we need\r
-# to fix that after linking (since CGI isnt a known type - argh!):\r
-# http://www.gknw.de/development/prgtools/fixnlmname.zip\r
-FIXNLMN = fixnlmname #-q\r
-\r
-ZIP = zip -qzR9\r
-\r
-# must be equal to DEBUG or NDEBUG\r
-DB = NDEBUG\r
-# DB = DEBUG\r
-# Optimization: -O<n> or debugging: -g\r
-ifeq ($(DB),NDEBUG)\r
- OPT = -O2\r
- OBJDIR = release\r
-else\r
- OPT = -g\r
- OBJDIR = debug\r
-endif\r
-\r
-# Include the version info retrieved from source.\r
--include $(OBJDIR)/version.inc\r
-\r
-# Global flags for all compilers\r
-CFLAGS = $(OPT) -D$(DB) -nostdinc -DNETWARE -DN_PLAT_NLM -D_POSIX_SOURCE\r
-CFLAGS += -DHAVE_CONFIG_H\r
-\r
-ifeq ($(CC),mwccnlm)\r
-LD = mwldnlm\r
-LDFLAGS = -nostdlib $^ $(PRELUDE) $(LDLIBS) -o $@ -commandfile\r
-AR = $(LD)\r
-ARFLAGS = -type library -w nocmdline $(OBJS) -o\r
-LIBEXT = lib\r
-CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586\r
-CFLAGS += -relax_pointers\r
-#CFLAGS += -w on,nounused,nounusedexpr # -ansi strict\r
-ifeq ($(LIBARCH),LIBC)\r
- PRELUDE = $(SDK_LIBC)/imports/libcpre.o\r
- CFLAGS += -align 4\r
-else\r
- PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"\r
- CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"\r
- CFLAGS += -align 1\r
-endif\r
-else\r
-LD = nlmconv\r
-LDFLAGS = -T\r
-AR = ar\r
-ARFLAGS = -cq\r
-LIBEXT = a\r
-CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return -fno-strict-aliasing\r
-CFLAGS += -Wall -Wno-unused # -pedantic\r
-ifeq ($(LIBARCH),LIBC)\r
- PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o\r
-else\r
- PRELUDE = $(NDK_ROOT)/pre/prelude.o\r
- CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h\r
-endif\r
-endif\r
-\r
-ifeq ($(findstring linux,$(OSTYPE)),linux)\r
-#include $(NDKBASE)/nlmconv/ncpfs.inc\r
-DL = '\r
-endif\r
-\r
-ifeq ($(MTSAFE),YES)\r
- XDCOPT = -n\r
-endif\r
-ifeq ($(MTSAFE),NO)\r
- XDCOPT = -u\r
-endif\r
-ifndef COPYR\r
- COPYR = Copyright (c) 2006 The Open Source Community.\r
-endif\r
-ifndef DESCR\r
- DESCR = $(notdir $(@:.def=)) Command Extension\r
-endif\r
-DESCR += ($(LIBARCH)) - $(CC) build\r
-\r
-NDK_ROOT = $(NDKBASE)/ndk\r
-SDK_CLIB = $(NDK_ROOT)/nwsdk\r
-SDK_LIBC = $(NDK_ROOT)/libc\r
-\r
-INCLUDES = -I. -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK) \r
-\r
-ifeq ($(LIBARCH),LIBC)\r
- INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks\r
-else\r
- INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include\r
-endif\r
-\r
-CFLAGS += $(INCLUDES)\r
-\r
-vpath %.c . $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK)\r
-\r
-RRDLIBOBJS = \\r
- $(OBJDIR)/rrd_afm.o \\r
- $(OBJDIR)/rrd_afm_data.o \\r
- $(OBJDIR)/rrd_create.o \\r
- $(OBJDIR)/rrd_diff.o \\r
- $(OBJDIR)/rrd_dump.o \\r
- $(OBJDIR)/rrd_error.o \\r
- $(OBJDIR)/rrd_fetch.o \\r
- $(OBJDIR)/rrd_first.o \\r
- $(OBJDIR)/rrd_format.o \\r
- $(OBJDIR)/rrd_gfx.o \\r
- $(OBJDIR)/rrd_graph.o \\r
- $(OBJDIR)/rrd_graph_helper.o \\r
- $(OBJDIR)/rrd_hw.o \\r
- $(OBJDIR)/rrd_info.o \\r
- $(OBJDIR)/rrd_last.o \\r
- $(OBJDIR)/rrd_nan_inf.o \\r
- $(OBJDIR)/rrd_open.o \\r
- $(OBJDIR)/rrd_resize.o \\r
- $(OBJDIR)/rrd_restore.o \\r
- $(OBJDIR)/rrd_rpncalc.o \\r
- $(OBJDIR)/rrd_tune.o \\r
- $(OBJDIR)/rrd_update.o \\r
- $(OBJDIR)/rrd_version.o \\r
- $(OBJDIR)/rrd_xport.o \\r
- $(OBJDIR)/rrd_thread_safe.o \\r
- $(EOLIST)\r
-\r
-XLIBOBJS = \\r
- $(OBJDIR)/art_rgba_svp.o \\r
- $(OBJDIR)/getopt.o \\r
- $(OBJDIR)/getopt1.o \\r
- $(OBJDIR)/hash_32.o \\r
- $(OBJDIR)/parsetime.o \\r
- $(OBJDIR)/pngsize.o \\r
- $(EOLIST)\r
-\r
-PNGLIBOBJS = \\r
- $(OBJDIR)/png.o \\r
- $(OBJDIR)/pngerror.o \\r
- $(OBJDIR)/pngget.o \\r
- $(OBJDIR)/pngmem.o \\r
- $(OBJDIR)/pngpread.o \\r
- $(OBJDIR)/pngread.o \\r
- $(OBJDIR)/pngrio.o \\r
- $(OBJDIR)/pngrtran.o \\r
- $(OBJDIR)/pngrutil.o \\r
- $(OBJDIR)/pngset.o \\r
- $(OBJDIR)/pngtrans.o \\r
- $(OBJDIR)/pngwio.o \\r
- $(OBJDIR)/pngwrite.o \\r
- $(OBJDIR)/pngwtran.o \\r
- $(OBJDIR)/pngwutil.o \\r
- $(EOLIST)\r
-ifeq "$(wildcard $(LIBPNG)/pnggccrd.c)" "$(LIBPNG)/pnggccrd.c"\r
-PNGLIBOBJS += \\r
- $(OBJDIR)/pnggccrd.o \\r
- $(OBJDIR)/pngvcrd.o \\r
- $(EOLIST)\r
-endif\r
-\r
-ZLIBOBJS = \\r
- $(OBJDIR)/adler32.o \\r
- $(OBJDIR)/compress.o \\r
- $(OBJDIR)/crc32.o \\r
- $(OBJDIR)/deflate.o \\r
- $(OBJDIR)/inflate.o \\r
- $(OBJDIR)/inffast.o \\r
- $(OBJDIR)/inftrees.o \\r
- $(OBJDIR)/trees.o \\r
- $(OBJDIR)/zutil.o \\r
- $(EOLIST)\r
-ifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"\r
-ZLIBOBJS += \\r
- $(OBJDIR)/infblock.o \\r
- $(OBJDIR)/infcodes.o \\r
- $(OBJDIR)/infutil.o \\r
- $(EOLIST)\r
-endif\r
-\r
-ARTLIBOBJS = \\r
- $(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))\r
-\r
-OBJS := $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)\r
-OBJCGI := $(OBJS) $(OBJDIR)/rrd_cgi.o\r
-OBJTOOL := $(OBJS) $(OBJDIR)/rrd_tool.o\r
-\r
-LDLIBS += $(LIBFT2)/builds/netware/libc/libft2.$(LIBEXT)\r
-\r
-\r
-all: rrdtool rrdcgi\r
-\r
-rrdtool: $(OBJDIR) config.h $(OBJDIR)/rrdtool.nlm\r
-rrdcgi: $(OBJDIR) config.h $(OBJDIR)/rrdcgi.$(CGIEXT)\r
-librrd: $(OBJDIR) config.h $(OBJDIR)/librrd.$(LIBEXT)\r
-\r
-dist: all $(DISTDIR) $(DISTDIR)/readme.txt\r
-# @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR)\r
- @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)\r
- @-$(CP) $(OBJDIR)/rrdtool.nlm $(DISTDIR)\r
- @-$(CP) $(RRD_DEFAULT_FONT) $(DISTDIR)\r
- @-$(CP) ../CHANGES $(DISTDIR)\r
- @-$(CP) ../COPYING $(DISTDIR)\r
- @-$(CP) ../COPYRIGHT $(DISTDIR)\r
- @-$(CP) ../NEWS $(DISTDIR)\r
- @-$(CP) ../README $(DISTDIR)\r
- @echo Creating $(ARCHIVE)\r
- @$(ZIP) $(ARCHIVE) $(DISTDIR)/* < $(DISTDIR)/readme.txt\r
-\r
-clean:\r
- -$(RM) -r $(OBJDIR)\r
- -$(RM) config.h\r
-\r
-distclean: clean\r
- -$(RM) -r $(DISTDIR)\r
- -$(RM) $(ARCHIVE)\r
-\r
-$(OBJDIR):\r
- @mkdir $@\r
-\r
-$(DISTDIR):\r
- @mkdir $@\r
-\r
-$(OBJDIR)/%.o: %.c\r
- @echo Compiling $<\r
- @$(CC) $(CFLAGS) -c $< -o $@\r
-\r
-$(OBJDIR)/version.inc: ../configure.ac $(OBJDIR) get_ver.awk\r
- @echo Creating $@\r
- @awk -f get_ver.awk $< > $@\r
-\r
-$(OBJDIR)/rrdcgi.$(CGIEXT): $(OBJCGI) $(OBJDIR)/rrdcgi.def $(OBJDIR)/rrdcgi.xdc\r
- @echo Linking $@\r
- @-$(RM) $@\r
- @$(LD) $(LDFLAGS) $(@:.$(CGIEXT)=.def)\r
-ifneq ($(CGIEXT),nlm)\r
-ifeq ($(LD),mwldnlm)\r
- @$(FIXNLMN) $@\r
-endif\r
-endif\r
-\r
-$(OBJDIR)/rrdtool.nlm: $(OBJTOOL) $(OBJDIR)/rrdtool.def $(OBJDIR)/rrdtool.xdc\r
- @echo Linking $@\r
- @-$(RM) $@\r
- @$(LD) $(LDFLAGS) $(@:.nlm=.def)\r
-\r
-$(OBJDIR)/librrd.$(LIBEXT): $(OBJS)\r
- @echo Creating $@\r
- @-$(RM) $@\r
- @$(AR) $(ARFLAGS) $@ $^\r
-\r
-$(OBJDIR)/%.xdc: Makefile.NetWare\r
- @echo Creating $@\r
- @$(MPKXDC) $(XDCOPT) $@\r
-\r
-$(OBJDIR)/%.def: Makefile.NetWare $(OBJDIR)/version.inc\r
- @echo $(DL)# DEF Linker File for use with gcc and nlmconv$(DL) > $@\r
- @echo $(DL)# or with Codewarrior command line compiler.$(DL) >> $@\r
- @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@\r
- @echo $(DL)# All your changes will be lost!!$(DL) >> $@\r
- @echo $(DL)#$(DL) >> $@\r
- @echo $(DL)copyright "$(COPYR)"$(DL) >> $@\r
- @echo $(DL)description "$(DESCR)"$(DL) >> $@\r
- @echo $(DL)version $(RRD_VERSION)$(DL) >> $@\r
-ifdef NLMTYPE\r
- @echo $(DL)type $(NLMTYPE)$(DL) >> $@\r
-else\r
- @echo $(DL)type 0$(DL) >> $@\r
-endif\r
-ifdef STACK\r
- @echo $(DL)stack $(STACK)$(DL) >> $@\r
-endif\r
- @echo $(DL)threadname "$(notdir $(@:.def=))"$(DL) >> $@\r
-ifdef SCREEN\r
- @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@\r
-else\r
- @echo $(DL)screenname "DEFAULT"$(DL) >> $@\r
-endif\r
-ifeq ($(DB),DEBUG)\r
- @echo $(DL)debug$(DL) >> $@\r
-endif\r
-ifeq ($(LIBARCH),CLIB)\r
- @echo $(DL)start _Prelude$(DL) >> $@\r
- @echo $(DL)exit _Stop$(DL) >> $@\r
- @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/clib.imp$(DL) >> $@\r
- @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/threads.imp$(DL) >> $@\r
- @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/nlmlib.imp$(DL) >> $@\r
- @echo $(DL)module clib$(DL) >> $@\r
-else\r
- @echo $(DL)start _LibCPrelude$(DL) >> $@\r
- @echo $(DL)exit _LibCPostlude$(DL) >> $@\r
- @echo $(DL)check _LibCCheckUnload$(DL) >> $@\r
- @echo $(DL)import @$(NDK_ROOT)/libc/imports/libc.imp$(DL) >> $@\r
- @echo $(DL)import @$(NDK_ROOT)/libc/imports/netware.imp$(DL) >> $@\r
- @echo $(DL)module libc$(DL) >> $@\r
- @echo $(DL)pseudopreemption$(DL) >> $@\r
- @echo $(DL)flag_on 64$(DL) >> $@\r
-endif\r
-ifeq ($(LDRING),0)\r
- @echo $(DL)flag_on 16$(DL) >> $@\r
-endif\r
-ifeq ($(LDRING),3)\r
- @echo $(DL)flag_on 512$(DL) >> $@\r
-endif\r
-ifdef XDCOPT\r
- @echo $(DL)xdcdata $(@:.def=.xdc)$(DL) >> $@\r
-endif\r
-ifeq ($(LD),nlmconv)\r
- @echo $(DL)input $(OBJS) $(LDLIBS)$(DL) >> $@\r
- @echo $(DL)input $(PRELUDE)$(DL) >> $@\r
- @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@\r
-endif\r
-\r
-config.h: Makefile.NetWare\r
- @echo Creating $@\r
- @echo $(DL)/* $@ for NetWare target.$(DL) > $@\r
- @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@\r
- @echo $(DL)** All your changes will be lost!!$(DL) >> $@\r
- @echo $(DL)*/$(DL) >> $@\r
- @echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@\r
- @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@\r
- @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@\r
- @echo $(DL)#define NUMVERS $(RRD_NUMVERS)$(DL) >> $@\r
- @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_FLOAT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MATH_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MBSTOWCS 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MEMMOVE 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MKTIME 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@\r
-# @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDARG_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDDEF_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_TZSET 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_VPRINTF 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@\r
- @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@\r
- @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@\r
-ifdef NO_NULL_REALLOC\r
- @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@\r
- @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@\r
-else\r
- @echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@\r
-endif\r
- @echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@\r
- @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@\r
-ifdef WITH_PIECHART\r
- @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@\r
-endif\r
-\r
-$(DISTDIR)/readme.txt: Makefile.NetWare\r
- @echo Creating $@\r
- @echo $(DL)This is a binary distribution for NetWare platform.$(DL) > $@\r
- @echo $(DL)RRDTool version $(RRD_VERSION_STR)$(DL) >> $@\r
- @echo $(DL)Please download the complete RRDTool package for$(DL) >> $@\r
- @echo $(DL)any further documentation:$(DL) >> $@\r
- @echo $(DL)$(WWWURL)$(DL) >> $@\r
-\r
-\r
+# Gnu Makefile for NetWare target * 11-Aug-2006
+# for use with gcc/nlmconv or Metrowerks CodeWarrior compiler
+# use with: make -f Makefile.NetWare [all|clean|dist|distclean]
+
+DESCR = Round Robin Database Tool $(RRD_VERSION_STR)
+COPYR = Copyright (c) 1997-2006 by Tobias Oetiker
+#WWWURL = http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/
+WWWURL = http://www.rrdtool.org/
+MTSAFE = YES
+#SCREEN = $(DESCR)
+STACK = 65535
+# Comment the line below if you dont want to load protected automatically.
+#LDRING = 3
+
+# Set the default font used in graphs.
+ifndef RRD_DEFAULT_FONT
+#RRD_DEFAULT_FONT = "sys:/java/nwgfx/lib/x11/fonts/ttf/tt0003m_.ttf"
+RRD_DEFAULT_FONT = "DejaVuSansMono-Roman.ttf"
+#RRD_DEFAULT_FONT = "VeraMono.ttf"
+endif
+
+# Vertical label angle: 90.0 (default) or 270.0
+RRDGRAPH_YLEGEND_ANGLE = 90.0
+
+# Set to one if you want to have piecharts.
+WITH_PIECHART = 1
+
+# Set the extension used for rrdcgi.
+ifndef CGIEXT
+CGIEXT = nlm
+endif
+
+# Edit the path below to point to your Novell NDK.
+ifndef NDKBASE
+NDKBASE = c:/novell
+endif
+
+# Base for the lib sources
+ifndef LIBBASE
+LIBBASE = ../..
+endif
+# All library code is statically linked to avoid problems with other lib NLMs.
+# Edit the path below to point to your libpng sources or set environment var.
+ifndef LIBPNG
+LIBPNG = $(LIBBASE)/libpng-1.2.12
+endif
+# Edit the path below to point to your freetype sources or set environment var.
+ifndef LIBFT2
+LIBFT2 = $(LIBBASE)/freetype-2.2.1
+endif
+# Edit the path below to point to your libart sources or set environment var.
+ifndef LIBART
+LIBART = $(LIBBASE)/libart_lgpl-2.3.17
+endif
+# Edit the path below to point to your zlib sources or set environment var.
+ifndef ZLIBSDK
+ZLIBSDK = $(LIBBASE)/zlib-1.2.3
+endif
+
+# Edit the path below to point to your distribution folder.
+ifndef DISTDIR
+DISTDIR = rrdtool-$(RRD_VERSION_STR)-nw
+endif
+ARCHIVE = $(DISTDIR).zip
+
+# whatever...
+# NO_NULL_REALLOC = 1
+
+# Edit the var below to point to your lib architecture.
+ifndef LIBARCH
+# LIBARCH = CLIB
+LIBARCH = LIBC
+endif
+
+# The following line defines your compiler.
+ifdef METROWERKS
+ CC = mwccnlm
+else
+ CC = gcc
+endif
+# RM = rm -f
+CP = cp -afv
+# if you want to mark the target as MTSAFE you will need a tool for
+# generating the xdc data for the linker; here's a minimal tool:
+# http://www.gknw.net/development/prgtools/mkxdc.zip
+MPKXDC = mkxdc
+# CodeWarrior is too stupid to set the internal name properly when
+# the extension is not a NLM and not a registered type. So we need
+# to fix that after linking (since CGI isnt a known type - argh!):
+# http://www.gknw.net/development/prgtools/fixnlmname.zip
+FIXNLMN = fixnlmname #-q
+# Here you can find a native Win32 binary of the original awk:
+# http://www.gknw.net/development/prgtools/awk.zip
+AWK = awk
+ZIP = zip -qzR9
+
+# must be equal to DEBUG or NDEBUG
+DB = NDEBUG
+# DB = DEBUG
+# Optimization: -O<n> or debugging: -g
+ifeq ($(DB),NDEBUG)
+ OPT = -O2
+ OBJDIR = release
+else
+ OPT = -g
+ OBJDIR = debug
+endif
+
+# Include the version info retrieved from source.
+-include $(OBJDIR)/version.inc
+
+# Global flags for all compilers
+CFLAGS = $(OPT) -D$(DB) -nostdinc -DNETWARE -DN_PLAT_NLM -D_POSIX_SOURCE
+CFLAGS += -DHAVE_CONFIG_H
+
+ifeq ($(CC),mwccnlm)
+LD = mwldnlm
+LDFLAGS = -nostdlib $^ $(PRELUDE) $(LDLIBS) -o $@ -commandfile
+AR = $(LD)
+ARFLAGS = -type library -w nocmdline $(OBJS) -o
+LIBEXT = lib
+CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
+CFLAGS += -relax_pointers
+#CFLAGS += -w on,nounused,nounusedexpr # -ansi strict
+ifeq ($(LIBARCH),LIBC)
+ PRELUDE = $(SDK_LIBC)/imports/libcpre.o
+ CFLAGS += -align 4
+else
+ PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
+ CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
+ CFLAGS += -align 1
+endif
+else
+LD = nlmconv
+LDFLAGS = -T
+AR = ar
+ARFLAGS = -cq
+LIBEXT = a
+CFLAGS += -fno-builtin -fpack-struct -fpcc-struct-return -fno-strict-aliasing
+CFLAGS += -Wall -Wno-unused # -pedantic
+ifeq ($(LIBARCH),LIBC)
+ PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
+else
+ PRELUDE = $(NDK_ROOT)/pre/prelude.o
+ CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
+endif
+endif
+
+ifeq ($(findstring linux,$(OSTYPE)),linux)
+#include $(NDKBASE)/nlmconv/ncpfs.inc
+DL = '
+endif
+
+ifeq ($(MTSAFE),YES)
+ XDCOPT = -n
+endif
+ifeq ($(MTSAFE),NO)
+ XDCOPT = -u
+endif
+ifndef COPYR
+ COPYR = Copyright (c) 2006 The Open Source Community.
+endif
+ifndef DESCR
+ DESCR = $(notdir $(@:.def=)) Command Extension
+endif
+DESCR += ($(LIBARCH)) - $(CC) build
+
+NDK_ROOT = $(NDKBASE)/ndk
+SDK_CLIB = $(NDK_ROOT)/nwsdk
+SDK_LIBC = $(NDK_ROOT)/libc
+
+INCLUDES = -I. -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)
+
+ifeq ($(LIBARCH),LIBC)
+ INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
+else
+ INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
+endif
+
+CFLAGS += $(INCLUDES)
+
+vpath %.c . $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK)
+
+RRDLIBOBJS = \
+ $(OBJDIR)/rrd_afm.o \
+ $(OBJDIR)/rrd_afm_data.o \
+ $(OBJDIR)/rrd_create.o \
+ $(OBJDIR)/rrd_diff.o \
+ $(OBJDIR)/rrd_dump.o \
+ $(OBJDIR)/rrd_error.o \
+ $(OBJDIR)/rrd_fetch.o \
+ $(OBJDIR)/rrd_first.o \
+ $(OBJDIR)/rrd_format.o \
+ $(OBJDIR)/rrd_gfx.o \
+ $(OBJDIR)/rrd_graph.o \
+ $(OBJDIR)/rrd_graph_helper.o \
+ $(OBJDIR)/rrd_hw.o \
+ $(OBJDIR)/rrd_info.o \
+ $(OBJDIR)/rrd_last.o \
+ $(OBJDIR)/rrd_nan_inf.o \
+ $(OBJDIR)/rrd_open.o \
+ $(OBJDIR)/rrd_resize.o \
+ $(OBJDIR)/rrd_restore.o \
+ $(OBJDIR)/rrd_rpncalc.o \
+ $(OBJDIR)/rrd_tune.o \
+ $(OBJDIR)/rrd_update.o \
+ $(OBJDIR)/rrd_version.o \
+ $(OBJDIR)/rrd_xport.o \
+ $(OBJDIR)/rrd_thread_safe.o \
+ $(EOLIST)
+
+XLIBOBJS = \
+ $(OBJDIR)/art_rgba_svp.o \
+ $(OBJDIR)/getopt.o \
+ $(OBJDIR)/getopt1.o \
+ $(OBJDIR)/hash_32.o \
+ $(OBJDIR)/parsetime.o \
+ $(OBJDIR)/pngsize.o \
+ $(EOLIST)
+
+PNGLIBOBJS = \
+ $(OBJDIR)/png.o \
+ $(OBJDIR)/pngerror.o \
+ $(OBJDIR)/pngget.o \
+ $(OBJDIR)/pngmem.o \
+ $(OBJDIR)/pngpread.o \
+ $(OBJDIR)/pngread.o \
+ $(OBJDIR)/pngrio.o \
+ $(OBJDIR)/pngrtran.o \
+ $(OBJDIR)/pngrutil.o \
+ $(OBJDIR)/pngset.o \
+ $(OBJDIR)/pngtrans.o \
+ $(OBJDIR)/pngwio.o \
+ $(OBJDIR)/pngwrite.o \
+ $(OBJDIR)/pngwtran.o \
+ $(OBJDIR)/pngwutil.o \
+ $(EOLIST)
+ifeq "$(wildcard $(LIBPNG)/pnggccrd.c)" "$(LIBPNG)/pnggccrd.c"
+PNGLIBOBJS += \
+ $(OBJDIR)/pnggccrd.o \
+ $(OBJDIR)/pngvcrd.o \
+ $(EOLIST)
+endif
+
+ZLIBOBJS = \
+ $(OBJDIR)/adler32.o \
+ $(OBJDIR)/compress.o \
+ $(OBJDIR)/crc32.o \
+ $(OBJDIR)/deflate.o \
+ $(OBJDIR)/inflate.o \
+ $(OBJDIR)/inffast.o \
+ $(OBJDIR)/inftrees.o \
+ $(OBJDIR)/trees.o \
+ $(OBJDIR)/zutil.o \
+ $(EOLIST)
+ifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"
+ZLIBOBJS += \
+ $(OBJDIR)/infblock.o \
+ $(OBJDIR)/infcodes.o \
+ $(OBJDIR)/infutil.o \
+ $(EOLIST)
+endif
+
+ARTLIBOBJS = \
+ $(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))
+
+OBJS := $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)
+OBJCGI := $(OBJS) $(OBJDIR)/rrd_cgi.o
+OBJTOOL := $(OBJS) $(OBJDIR)/rrd_tool.o
+
+LDLIBS += $(LIBFT2)/builds/netware/libc/libft2.$(LIBEXT)
+
+
+all: rrdtool rrdcgi
+
+rrdtool: $(OBJDIR) config.h $(OBJDIR)/rrdtool.nlm
+rrdcgi: $(OBJDIR) config.h $(OBJDIR)/rrdcgi.$(CGIEXT)
+librrd: $(OBJDIR) config.h $(OBJDIR)/librrd.$(LIBEXT)
+
+dist: all $(DISTDIR) $(DISTDIR)/readme.txt
+# @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR)
+ @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)
+ @-$(CP) $(OBJDIR)/rrdtool.nlm $(DISTDIR)
+ @-$(CP) $(RRD_DEFAULT_FONT) $(DISTDIR)
+ @-$(CP) ../CHANGES $(DISTDIR)
+ @-$(CP) ../COPYING $(DISTDIR)
+ @-$(CP) ../COPYRIGHT $(DISTDIR)
+ @-$(CP) ../NEWS $(DISTDIR)
+ @-$(CP) ../README $(DISTDIR)
+ @echo Creating $(ARCHIVE)
+ @$(ZIP) $(ARCHIVE) $(DISTDIR)/* < $(DISTDIR)/readme.txt
+
+clean:
+ -$(RM) -r $(OBJDIR)
+ -$(RM) config.h
+
+distclean: clean
+ -$(RM) -r $(DISTDIR)
+ -$(RM) $(ARCHIVE)
+
+$(OBJDIR):
+ @mkdir $@
+
+$(DISTDIR):
+ @mkdir $@
+
+$(OBJDIR)/%.o: %.c
+ @echo Compiling $<
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJDIR)/version.inc: ../configure.ac $(OBJDIR) get_ver.awk
+ @echo Creating $@
+ @$(AWK) -f get_ver.awk $< > $@
+
+$(OBJDIR)/rrdcgi.$(CGIEXT): $(OBJCGI) $(OBJDIR)/rrdcgi.def $(OBJDIR)/rrdcgi.xdc
+ @echo Linking $@
+ @-$(RM) $@
+ @$(LD) $(LDFLAGS) $(@:.$(CGIEXT)=.def)
+ifneq ($(CGIEXT),nlm)
+ifeq ($(LD),mwldnlm)
+ @$(FIXNLMN) $@
+endif
+endif
+
+$(OBJDIR)/rrdtool.nlm: $(OBJTOOL) $(OBJDIR)/rrdtool.def $(OBJDIR)/rrdtool.xdc
+ @echo Linking $@
+ @-$(RM) $@
+ @$(LD) $(LDFLAGS) $(@:.nlm=.def)
+
+$(OBJDIR)/librrd.$(LIBEXT): $(OBJS)
+ @echo Creating $@
+ @-$(RM) $@
+ @$(AR) $(ARFLAGS) $@ $^
+
+$(OBJDIR)/%.xdc: Makefile.NetWare
+ @echo Creating $@
+ @$(MPKXDC) $(XDCOPT) $@
+
+$(OBJDIR)/%.def: Makefile.NetWare $(OBJDIR)/version.inc
+ @echo $(DL)# DEF Linker File for use with gcc and nlmconv$(DL) > $@
+ @echo $(DL)# or with Codewarrior command line compiler.$(DL) >> $@
+ @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
+ @echo $(DL)# All your changes will be lost!!$(DL) >> $@
+ @echo $(DL)#$(DL) >> $@
+ @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
+ @echo $(DL)description "$(DESCR)"$(DL) >> $@
+ @echo $(DL)version $(RRD_VERSION)$(DL) >> $@
+ifdef NLMTYPE
+ @echo $(DL)type $(NLMTYPE)$(DL) >> $@
+else
+ @echo $(DL)type 0$(DL) >> $@
+endif
+ifdef STACK
+ @echo $(DL)stack $(STACK)$(DL) >> $@
+endif
+ @echo $(DL)threadname "$(notdir $(@:.def=))"$(DL) >> $@
+ifdef SCREEN
+ @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
+else
+ @echo $(DL)screenname "DEFAULT"$(DL) >> $@
+endif
+ifeq ($(DB),DEBUG)
+ @echo $(DL)debug$(DL) >> $@
+endif
+ifeq ($(LIBARCH),CLIB)
+ @echo $(DL)start _Prelude$(DL) >> $@
+ @echo $(DL)exit _Stop$(DL) >> $@
+ @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/clib.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/threads.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/nlmlib.imp$(DL) >> $@
+ @echo $(DL)module clib$(DL) >> $@
+else
+ @echo $(DL)start _LibCPrelude$(DL) >> $@
+ @echo $(DL)exit _LibCPostlude$(DL) >> $@
+ @echo $(DL)check _LibCCheckUnload$(DL) >> $@
+ @echo $(DL)import @$(NDK_ROOT)/libc/imports/libc.imp$(DL) >> $@
+ @echo $(DL)import @$(NDK_ROOT)/libc/imports/netware.imp$(DL) >> $@
+ @echo $(DL)module libc$(DL) >> $@
+ @echo $(DL)pseudopreemption$(DL) >> $@
+ @echo $(DL)flag_on 64$(DL) >> $@
+endif
+ifeq ($(LDRING),0)
+ @echo $(DL)flag_on 16$(DL) >> $@
+endif
+ifeq ($(LDRING),3)
+ @echo $(DL)flag_on 512$(DL) >> $@
+endif
+ifdef XDCOPT
+ @echo $(DL)xdcdata $(@:.def=.xdc)$(DL) >> $@
+endif
+ifeq ($(LD),nlmconv)
+ @echo $(DL)input $(OBJS) $(LDLIBS)$(DL) >> $@
+ @echo $(DL)input $(PRELUDE)$(DL) >> $@
+ @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
+endif
+
+config.h: Makefile.NetWare
+ @echo Creating $@
+ @echo $(DL)/* $@ for NetWare target.$(DL) > $@
+ @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
+ @echo $(DL)** All your changes will be lost!!$(DL) >> $@
+ @echo $(DL)*/$(DL) >> $@
+ @echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
+ @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@
+ @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@
+ @echo $(DL)#define NUMVERS $(RRD_NUMVERS)$(DL) >> $@
+ @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FLOAT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MATH_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MBSTOWCS 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MEMMOVE 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MKTIME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
+# @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDARG_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDDEF_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TZSET 1$(DL) >> $@
+ @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_VPRINTF 1$(DL) >> $@
+ @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
+ @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
+ @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
+ifdef NO_NULL_REALLOC
+ @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@
+ @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@
+else
+ @echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@
+endif
+ @echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@
+ @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@
+ifdef WITH_PIECHART
+ @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@
+endif
+
+$(DISTDIR)/readme.txt: Makefile.NetWare
+ @echo Creating $@
+ @echo $(DL)This is a binary distribution for NetWare platform.$(DL) > $@
+ @echo $(DL)RRDTool version $(RRD_VERSION_STR)$(DL) >> $@
+ @echo $(DL)Please download the complete RRDTool package for$(DL) >> $@
+ @echo $(DL)any further documentation:$(DL) >> $@
+ @echo $(DL)$(WWWURL)$(DL) >> $@
+
+
index c9230d4f650d2dfa7946ff0d00cee41ffdd88f26..e0cb1d948b76b724bdcce33ea2606785581d196e 100644 (file)
-# Gnu Makefile for Win32 target * 11-Jul-2006\r
-# for use with MingW32 gcc or Metrowerks CodeWarrior compiler\r
-# use with: make -f Makefile.Win32 [all|clean|dist|distclean]\r
-\r
-DESCR = Round Robin Database Tool\r
-COPYR = Copyright (c) 1997-2006 by Tobias Oetiker\r
-#WWWURL = http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/\r
-WWWURL = http://www.rrdtool.org/\r
-ICON = ../favicon.ico\r
-\r
-# Set the default font used in graphs.\r
-ifndef RRD_DEFAULT_FONT\r
-#RRD_DEFAULT_FONT = "arial.ttf"\r
-#RRD_DEFAULT_FONT = "DejaVuSansMono-Roman.ttf"\r
-RRD_DEFAULT_FONT = "VeraMono.ttf"\r
-endif\r
-\r
-# Vertical label angle: 90.0 (default) or 270.0\r
-RRDGRAPH_YLEGEND_ANGLE = 90.0\r
-\r
-# Set to one if you want to have piecharts.\r
-WITH_PIECHART = 1\r
-\r
-# Set the extension used for rrdcgi.\r
-ifndef CGIEXT\r
-CGIEXT = exe\r
-endif\r
-\r
-# Base for the lib sources\r
-ifndef LIBBASE\r
-LIBBASE = ../..\r
-endif\r
-# All library code is statically linked to avoid problems with other lib DLLs. \r
-# Edit the path below to point to your libpng sources or set environment var.\r
-ifndef LIBPNG\r
-LIBPNG = $(LIBBASE)/libpng-1.2.10\r
-endif\r
-# Edit the path below to point to your freetype sources or set environment var.\r
-ifndef LIBFT2\r
-#LIBFT2 = $(LIBBASE)/freetype-2.1.10\r
-LIBFT2 = $(LIBBASE)/../mingw32/freetype-2.1.10\r
-endif\r
-# Edit the path below to point to your freetype sources or set environment var.\r
-ifndef LIBART\r
-LIBART = $(LIBBASE)/libart_lgpl-2.3.17\r
-endif\r
-# Edit the path below to point to your zlib sources or set environment var.\r
-ifndef ZLIBSDK\r
-ZLIBSDK = $(LIBBASE)/zlib-1.2.3\r
-endif\r
-\r
-# Edit the path below to point to your distribution folder.\r
-ifndef DISTDIR\r
-DISTDIR = rrdtool-$(RRD_VERSION_STR)-w32\r
-endif\r
-ARCHIVE = $(DISTDIR).zip\r
-\r
-# whatever...\r
-NO_NULL_REALLOC = 1\r
-\r
-# The following line defines your compiler.\r
-ifdef METROWERKS\r
- CC = mwcc\r
-else\r
- CC = gcc\r
-endif\r
-# RM = rm -f\r
-CP = cp -afv\r
-\r
-ZIP = zip -qzR9\r
-\r
-# must be equal to DEBUG or NDEBUG\r
-DB = NDEBUG\r
-# DB = DEBUG\r
-# Optimization: -O<n> or debugging: -g\r
-ifeq ($(DB),NDEBUG)\r
- OPT = -O2\r
- OBJDIR = release\r
-else\r
- OPT = -g\r
- OBJDIR = debug\r
-endif\r
-\r
-# Include the version info retrieved from source.\r
--include $(OBJDIR)/version.inc\r
-\r
-# Global flags for all compilers\r
-CFLAGS = $(OPT) -D$(DB) -DHAVE_CONFIG_H\r
-\r
-ifeq ($(CC),mwcc)\r
-LD = mwld\r
-RC = mwwinrc\r
-LDFLAGS = -nostdlib\r
-AR = $(LD)\r
-ARFLAGS = -type library -w nocmdline $(OBJS) -o\r
-LIBEXT = lib\r
-LIBPATH += -lr "$(METROWERKS)/MSL" -lr "$(METROWERKS)/Win32-x86 Support"\r
-LDLIBS += -lkernel32.lib -luser32.lib\r
-LDLIBS += -lMSL_Runtime_x86.lib -lMSL_C_x86.lib -lMSL_Extras_x86.lib\r
-RCFLAGS =\r
-CFLAGS += -nostdinc -gccinc -msgstyle gcc -inline off -opt nointrinsics -proc 586\r
-CFLAGS += -ir "$(METROWERKS)/MSL" -ir "$(METROWERKS)/Win32-x86 Support"\r
-CFLAGS += -w on,nounused,nounusedexpr # -ansi strict\r
-else\r
-LD = gcc\r
-RC = windres\r
-LDFLAGS = -s\r
-AR = ar\r
-ARFLAGS = -cq\r
-LIBEXT = a\r
-RCFLAGS = -I rc -O coff -i\r
-CFLAGS += -fno-strict-aliasing -Wall -Wno-unused # -pedantic\r
-endif\r
-\r
-ifndef COPYR\r
- COPYR = Copyright (c) 2006 The Open Source Community.\r
-endif\r
-ifndef DESCR\r
- DESCR = $(notdir $(@:.rc=)) Command Extension\r
-endif\r
-DESCR += - $(CC) build\r
-\r
-INCLUDES += -I. -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK) \r
-\r
-CFLAGS += $(INCLUDES)\r
-\r
-vpath %.c . $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK) \r
-\r
-RRDLIBOBJS = \\r
- $(OBJDIR)/rrd_afm.o \\r
- $(OBJDIR)/rrd_afm_data.o \\r
- $(OBJDIR)/rrd_create.o \\r
- $(OBJDIR)/rrd_diff.o \\r
- $(OBJDIR)/rrd_dump.o \\r
- $(OBJDIR)/rrd_error.o \\r
- $(OBJDIR)/rrd_fetch.o \\r
- $(OBJDIR)/rrd_first.o \\r
- $(OBJDIR)/rrd_format.o \\r
- $(OBJDIR)/rrd_gfx.o \\r
- $(OBJDIR)/rrd_graph.o \\r
- $(OBJDIR)/rrd_graph_helper.o \\r
- $(OBJDIR)/rrd_hw.o \\r
- $(OBJDIR)/rrd_info.o \\r
- $(OBJDIR)/rrd_last.o \\r
- $(OBJDIR)/rrd_nan_inf.o \\r
- $(OBJDIR)/rrd_open.o \\r
- $(OBJDIR)/rrd_resize.o \\r
- $(OBJDIR)/rrd_restore.o \\r
- $(OBJDIR)/rrd_rpncalc.o \\r
- $(OBJDIR)/rrd_tune.o \\r
- $(OBJDIR)/rrd_update.o \\r
- $(OBJDIR)/rrd_version.o \\r
- $(OBJDIR)/rrd_xport.o \\r
- $(OBJDIR)/rrd_thread_safe_nt.o \\r
- $(EOLIST)\r
-\r
-XLIBOBJS = \\r
- $(OBJDIR)/art_rgba_svp.o \\r
- $(OBJDIR)/getopt.o \\r
- $(OBJDIR)/getopt1.o \\r
- $(OBJDIR)/hash_32.o \\r
- $(OBJDIR)/parsetime.o \\r
- $(OBJDIR)/pngsize.o \\r
- $(OBJDIR)/strftime.o \\r
- $(EOLIST)\r
-\r
-PNGLIBOBJS = \\r
- $(OBJDIR)/png.o \\r
- $(OBJDIR)/pngerror.o \\r
- $(OBJDIR)/pngget.o \\r
- $(OBJDIR)/pngmem.o \\r
- $(OBJDIR)/pngpread.o \\r
- $(OBJDIR)/pngread.o \\r
- $(OBJDIR)/pngrio.o \\r
- $(OBJDIR)/pngrtran.o \\r
- $(OBJDIR)/pngrutil.o \\r
- $(OBJDIR)/pngset.o \\r
- $(OBJDIR)/pngtrans.o \\r
- $(OBJDIR)/pngwio.o \\r
- $(OBJDIR)/pngwrite.o \\r
- $(OBJDIR)/pngwtran.o \\r
- $(OBJDIR)/pngwutil.o \\r
- $(EOLIST)\r
-ifeq "$(wildcard $(LIBPNG)/pnggccrd.c)" "$(LIBPNG)/pnggccrd.c"\r
-PNGLIBOBJS += \\r
- $(OBJDIR)/pnggccrd.o \\r
- $(OBJDIR)/pngvcrd.o \\r
- $(EOLIST)\r
-endif\r
-\r
-ZLIBOBJS = \\r
- $(OBJDIR)/adler32.o \\r
- $(OBJDIR)/compress.o \\r
- $(OBJDIR)/crc32.o \\r
- $(OBJDIR)/deflate.o \\r
- $(OBJDIR)/inflate.o \\r
- $(OBJDIR)/inffast.o \\r
- $(OBJDIR)/inftrees.o \\r
- $(OBJDIR)/trees.o \\r
- $(OBJDIR)/zutil.o \\r
- $(EOLIST)\r
-ifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"\r
-ZLIBOBJS += \\r
- $(OBJDIR)/infblock.o \\r
- $(OBJDIR)/infcodes.o \\r
- $(OBJDIR)/infutil.o \\r
- $(EOLIST)\r
-endif\r
-\r
-ARTLIBOBJS = \\r
- $(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))\r
-\r
-OBJS := $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)\r
-OBJCGI := $(OBJS) $(OBJDIR)/rrd_cgi.o\r
-OBJTOOL := $(OBJS) $(OBJDIR)/rrd_tool.o\r
-\r
-LDLIBS += $(LIBFT2)/objs/freetype.$(LIBEXT)\r
-\r
-\r
-all: rrdtool rrdcgi\r
-\r
-rrdtool: $(OBJDIR) config.h $(OBJDIR)/rrdtool.exe\r
-rrdcgi: $(OBJDIR) config.h $(OBJDIR)/rrdcgi.$(CGIEXT)\r
-librrd: $(OBJDIR) config.h $(OBJDIR)/librrd.$(LIBEXT)\r
-\r
-dist: all $(DISTDIR) $(DISTDIR)/readme.txt\r
-# @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR)\r
- @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)\r
- @-$(CP) $(OBJDIR)/rrdtool.exe $(DISTDIR)\r
- @-$(CP) $(RRD_DEFAULT_FONT) $(DISTDIR)\r
- @-$(CP) ../CHANGES $(DISTDIR)\r
- @-$(CP) ../COPYING $(DISTDIR)\r
- @-$(CP) ../COPYRIGHT $(DISTDIR)\r
- @-$(CP) ../NEWS $(DISTDIR)\r
- @-$(CP) ../README $(DISTDIR)\r
- @echo Creating $(ARCHIVE)\r
- @$(ZIP) $(ARCHIVE) $(DISTDIR)/* < $(DISTDIR)/readme.txt\r
-\r
-clean:\r
- -$(RM) -r $(OBJDIR)\r
- -$(RM) config.h\r
-\r
-distclean: clean\r
- -$(RM) -r $(DISTDIR)\r
- -$(RM) $(ARCHIVE)\r
-\r
-$(OBJDIR):\r
- @mkdir $@\r
-\r
-$(DISTDIR):\r
- @mkdir $@\r
-\r
-$(OBJDIR)/version.inc: ../configure.ac $(OBJDIR) get_ver.awk\r
- @echo Creating $@\r
- @awk -f get_ver.awk $< > $@\r
-\r
-$(OBJDIR)/%.o: %.c\r
- @echo Compiling $<\r
- @$(CC) $(CFLAGS) -c $< -o $@\r
-\r
-$(OBJDIR)/rrdcgi.$(CGIEXT): $(OBJCGI) $(OBJDIR)/rrdcgi.res\r
- @echo Linking $@\r
- @-$(RM) $@\r
- @$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)\r
-\r
-$(OBJDIR)/rrdtool.exe: $(OBJTOOL) $(OBJDIR)/rrdtool.res\r
- @echo Linking $@\r
- @-$(RM) $@\r
- @$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)\r
-\r
-$(OBJDIR)/librrd.$(LIBEXT): $(OBJS)\r
- @echo Creating $@\r
- @-$(RM) $@\r
- @$(AR) $(ARFLAGS) $@ $^\r
-\r
-$(OBJDIR)/%.res: $(OBJDIR)/%.rc\r
- @echo Creating $@\r
- @$(RC) $(RCFLAGS) $< -o $@\r
-\r
-$(OBJDIR)/%.rc: Makefile.Win32 $(OBJDIR)/version.inc \r
- @echo 1 VERSIONINFO > $@\r
- @echo FILEVERSION $(RRD_VERSION),0 >> $@\r
- @echo PRODUCTVERSION $(RRD_VERSION),0 >> $@\r
- @echo FILEFLAGSMASK 0x3fL >> $@\r
- @echo FILEOS 0x40004L >> $@\r
- @echo FILEFLAGS 0x0L >> $@\r
- @echo FILETYPE 0x1L >> $@\r
- @echo FILESUBTYPE 0x0L >> $@\r
- @echo BEGIN >> $@\r
- @echo BLOCK "StringFileInfo" >> $@\r
- @echo BEGIN >> $@\r
- @echo BLOCK "040904E4" >> $@\r
- @echo BEGIN >> $@\r
- @echo VALUE "LegalCopyright","$(COPYR)\0" >> $@\r
-ifdef COMPANY\r
- @echo VALUE "CompanyName","$(COMPANY)\0" >> $@\r
-endif\r
- @echo VALUE "ProductName","$(notdir $(@:.rc=.exe))\0" >> $@\r
- @echo VALUE "ProductVersion","$(RRD_VERSION_STR)\0" >> $@\r
- @echo VALUE "License","Released under GPL.\0" >> $@\r
- @echo VALUE "FileDescription","$(DESCR)\0" >> $@\r
- @echo VALUE "FileVersion","$(RRD_VERSION_STR)\0" >> $@\r
- @echo VALUE "InternalName","$(notdir $(@:.rc=))\0" >> $@\r
- @echo VALUE "OriginalFilename","$(notdir $(@:.rc=.exe))\0" >> $@\r
- @echo VALUE "WWW","$(WWWURL)\0" >> $@\r
- @echo END >> $@\r
- @echo END >> $@\r
- @echo BLOCK "VarFileInfo" >> $@\r
- @echo BEGIN >> $@\r
- @echo VALUE "Translation", 0x409, 1252 >> $@\r
- @echo END >> $@\r
- @echo END >> $@\r
-ifdef ICON\r
- @echo 1 ICON DISCARDABLE "$(ICON)" >> $@\r
-endif\r
-\r
-config.h: Makefile.Win32 $(OBJDIR)/version.inc\r
- @echo Creating $@\r
- @echo $(DL)/* $@ for NetWare target.$(DL) > $@\r
- @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@\r
- @echo $(DL)** All your changes will be lost!!$(DL) >> $@\r
- @echo $(DL)*/$(DL) >> $@\r
- @echo $(DL)#define OS "i586-pc-Win32"$(DL) >> $@\r
- @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@\r
- @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@\r
- @echo $(DL)#define NUMVERS $(RRD_NUMVERS)$(DL) >> $@\r
- @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@\r
-# @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MATH_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_MBSTOWCS 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@\r
-# @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDARG_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDDEF_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@\r
-# @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@\r
-# @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@\r
- @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@\r
- @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@\r
- @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@\r
-ifdef NO_NULL_REALLOC\r
- @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@\r
- @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@\r
-else\r
- @echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@\r
-endif\r
- @echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@\r
- @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@\r
- @echo $(DL)#define strftime strftime_$(DL) >> $@\r
-ifdef WITH_PIECHART\r
- @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@\r
-endif\r
-\r
-$(DISTDIR)/readme.txt: Makefile.Win32\r
- @echo Creating $@\r
- @echo $(DL)This is a binary distribution for Win32 platform.$(DL) > $@\r
- @echo $(DL)RRDTool version $(RRD_VERSION_STR)$(DL) >> $@\r
- @echo $(DL)Please download the complete RRDTool package for$(DL) >> $@\r
- @echo $(DL)any further documentation:$(DL) >> $@\r
- @echo $(DL)$(WWWURL)$(DL) >> $@\r
-\r
-\r
+# Gnu Makefile for Win32 target * 11-Aug-2006
+# for use with MingW32 gcc or Metrowerks CodeWarrior compiler
+# use with: make -f Makefile.Win32 [all|clean|dist|distclean]
+
+DESCR = Round Robin Database Tool
+COPYR = Copyright (c) 1997-2006 by Tobias Oetiker
+#WWWURL = http://ee-staff.ethz.ch/~oetiker/webtools/rrdtool/
+WWWURL = http://www.rrdtool.org/
+ICON = ../favicon.ico
+
+# Set the default font used in graphs.
+ifndef RRD_DEFAULT_FONT
+#RRD_DEFAULT_FONT = "arial.ttf"
+RRD_DEFAULT_FONT = "DejaVuSansMono-Roman.ttf"
+#RRD_DEFAULT_FONT = "VeraMono.ttf"
+endif
+
+# Vertical label angle: 90.0 (default) or 270.0
+RRDGRAPH_YLEGEND_ANGLE = 90.0
+
+# Set to one if you want to have piecharts.
+WITH_PIECHART = 1
+
+# Set the extension used for rrdcgi.
+ifndef CGIEXT
+CGIEXT = exe
+endif
+
+# Base for the lib sources
+ifndef LIBBASE
+LIBBASE = ../..
+endif
+# All library code is statically linked to avoid problems with other lib DLLs.
+# Edit the path below to point to your libpng sources or set environment var.
+ifndef LIBPNG
+LIBPNG = $(LIBBASE)/libpng-1.2.12
+endif
+# Edit the path below to point to your freetype sources or set environment var.
+ifndef LIBFT2
+#LIBFT2 = $(LIBBASE)/freetype-2.2.1
+LIBFT2 = $(LIBBASE)/../mingw32/freetype-2.2.1
+endif
+# Edit the path below to point to your libart sources or set environment var.
+ifndef LIBART
+LIBART = $(LIBBASE)/libart_lgpl-2.3.17
+endif
+# Edit the path below to point to your zlib sources or set environment var.
+ifndef ZLIBSDK
+ZLIBSDK = $(LIBBASE)/zlib-1.2.3
+endif
+
+# Edit the path below to point to your distribution folder.
+ifndef DISTDIR
+DISTDIR = rrdtool-$(RRD_VERSION_STR)-w32
+endif
+ARCHIVE = $(DISTDIR).zip
+
+# whatever...
+NO_NULL_REALLOC = 1
+
+# The following line defines your compiler.
+ifdef METROWERKS
+ CC = mwcc
+else
+ CC = gcc
+endif
+# RM = rm -f
+CP = cp -afv
+# Here you can find a native Win32 binary of the original awk:
+# http://www.gknw.net/development/prgtools/awk.zip
+AWK = awk
+ZIP = zip -qzR9
+
+# must be equal to DEBUG or NDEBUG
+DB = NDEBUG
+# DB = DEBUG
+# Optimization: -O<n> or debugging: -g
+ifeq ($(DB),NDEBUG)
+ OPT = -O2
+ OBJDIR = release
+else
+ OPT = -g
+ OBJDIR = debug
+endif
+
+# Include the version info retrieved from source.
+-include $(OBJDIR)/version.inc
+
+# Global flags for all compilers
+CFLAGS = $(OPT) -D$(DB) -DHAVE_CONFIG_H
+
+ifeq ($(CC),mwcc)
+LD = mwld
+RC = mwwinrc
+LDFLAGS = -nostdlib
+AR = $(LD)
+ARFLAGS = -type library -w nocmdline $(OBJS) -o
+LIBEXT = lib
+LIBPATH += -lr "$(METROWERKS)/MSL" -lr "$(METROWERKS)/Win32-x86 Support"
+LDLIBS += -lkernel32.lib -luser32.lib
+LDLIBS += -lMSL_Runtime_x86.lib -lMSL_C_x86.lib -lMSL_Extras_x86.lib
+RCFLAGS =
+CFLAGS += -nostdinc -gccinc -msgstyle gcc -inline off -opt nointrinsics -proc 586
+CFLAGS += -ir "$(METROWERKS)/MSL" -ir "$(METROWERKS)/Win32-x86 Support"
+CFLAGS += -w on,nounused,nounusedexpr # -ansi strict
+else
+LD = gcc
+RC = windres
+LDFLAGS = -s
+AR = ar
+ARFLAGS = -cq
+LIBEXT = a
+RCFLAGS = -I rc -O coff -i
+CFLAGS += -fno-strict-aliasing -Wall -Wno-unused # -pedantic
+endif
+
+ifndef COPYR
+ COPYR = Copyright (c) 2006 The Open Source Community.
+endif
+ifndef DESCR
+ DESCR = $(notdir $(@:.rc=)) Command Extension
+endif
+DESCR += - $(CC) build
+
+INCLUDES += -I. -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)
+
+CFLAGS += $(INCLUDES)
+
+vpath %.c . $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK)
+
+RRDLIBOBJS = \
+ $(OBJDIR)/rrd_afm.o \
+ $(OBJDIR)/rrd_afm_data.o \
+ $(OBJDIR)/rrd_create.o \
+ $(OBJDIR)/rrd_diff.o \
+ $(OBJDIR)/rrd_dump.o \
+ $(OBJDIR)/rrd_error.o \
+ $(OBJDIR)/rrd_fetch.o \
+ $(OBJDIR)/rrd_first.o \
+ $(OBJDIR)/rrd_format.o \
+ $(OBJDIR)/rrd_gfx.o \
+ $(OBJDIR)/rrd_graph.o \
+ $(OBJDIR)/rrd_graph_helper.o \
+ $(OBJDIR)/rrd_hw.o \
+ $(OBJDIR)/rrd_info.o \
+ $(OBJDIR)/rrd_last.o \
+ $(OBJDIR)/rrd_nan_inf.o \
+ $(OBJDIR)/rrd_open.o \
+ $(OBJDIR)/rrd_resize.o \
+ $(OBJDIR)/rrd_restore.o \
+ $(OBJDIR)/rrd_rpncalc.o \
+ $(OBJDIR)/rrd_tune.o \
+ $(OBJDIR)/rrd_update.o \
+ $(OBJDIR)/rrd_version.o \
+ $(OBJDIR)/rrd_xport.o \
+ $(OBJDIR)/rrd_thread_safe_nt.o \
+ $(EOLIST)
+
+XLIBOBJS = \
+ $(OBJDIR)/art_rgba_svp.o \
+ $(OBJDIR)/getopt.o \
+ $(OBJDIR)/getopt1.o \
+ $(OBJDIR)/hash_32.o \
+ $(OBJDIR)/parsetime.o \
+ $(OBJDIR)/pngsize.o \
+ $(OBJDIR)/strftime.o \
+ $(EOLIST)
+
+PNGLIBOBJS = \
+ $(OBJDIR)/png.o \
+ $(OBJDIR)/pngerror.o \
+ $(OBJDIR)/pngget.o \
+ $(OBJDIR)/pngmem.o \
+ $(OBJDIR)/pngpread.o \
+ $(OBJDIR)/pngread.o \
+ $(OBJDIR)/pngrio.o \
+ $(OBJDIR)/pngrtran.o \
+ $(OBJDIR)/pngrutil.o \
+ $(OBJDIR)/pngset.o \
+ $(OBJDIR)/pngtrans.o \
+ $(OBJDIR)/pngwio.o \
+ $(OBJDIR)/pngwrite.o \
+ $(OBJDIR)/pngwtran.o \
+ $(OBJDIR)/pngwutil.o \
+ $(EOLIST)
+ifeq "$(wildcard $(LIBPNG)/pnggccrd.c)" "$(LIBPNG)/pnggccrd.c"
+PNGLIBOBJS += \
+ $(OBJDIR)/pnggccrd.o \
+ $(OBJDIR)/pngvcrd.o \
+ $(EOLIST)
+endif
+
+ZLIBOBJS = \
+ $(OBJDIR)/adler32.o \
+ $(OBJDIR)/compress.o \
+ $(OBJDIR)/crc32.o \
+ $(OBJDIR)/deflate.o \
+ $(OBJDIR)/inflate.o \
+ $(OBJDIR)/inffast.o \
+ $(OBJDIR)/inftrees.o \
+ $(OBJDIR)/trees.o \
+ $(OBJDIR)/zutil.o \
+ $(EOLIST)
+ifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"
+ZLIBOBJS += \
+ $(OBJDIR)/infblock.o \
+ $(OBJDIR)/infcodes.o \
+ $(OBJDIR)/infutil.o \
+ $(EOLIST)
+endif
+
+ARTLIBOBJS = \
+ $(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))
+
+OBJS := $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)
+OBJCGI := $(OBJS) $(OBJDIR)/rrd_cgi.o
+OBJTOOL := $(OBJS) $(OBJDIR)/rrd_tool.o
+
+LDLIBS += $(LIBFT2)/objs/freetype.$(LIBEXT)
+
+
+all: rrdtool rrdcgi
+
+rrdtool: $(OBJDIR) config.h $(OBJDIR)/rrdtool.exe
+rrdcgi: $(OBJDIR) config.h $(OBJDIR)/rrdcgi.$(CGIEXT)
+librrd: $(OBJDIR) config.h $(OBJDIR)/librrd.$(LIBEXT)
+
+dist: all $(DISTDIR) $(DISTDIR)/readme.txt
+# @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR)
+ @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)
+ @-$(CP) $(OBJDIR)/rrdtool.exe $(DISTDIR)
+ @-$(CP) $(RRD_DEFAULT_FONT) $(DISTDIR)
+ @-$(CP) ../CHANGES $(DISTDIR)
+ @-$(CP) ../COPYING $(DISTDIR)
+ @-$(CP) ../COPYRIGHT $(DISTDIR)
+ @-$(CP) ../NEWS $(DISTDIR)
+ @-$(CP) ../README $(DISTDIR)
+ @echo Creating $(ARCHIVE)
+ @$(ZIP) $(ARCHIVE) $(DISTDIR)/* < $(DISTDIR)/readme.txt
+
+clean:
+ -$(RM) -r $(OBJDIR)
+ -$(RM) config.h
+
+distclean: clean
+ -$(RM) -r $(DISTDIR)
+ -$(RM) $(ARCHIVE)
+
+$(OBJDIR):
+ @mkdir $@
+
+$(DISTDIR):
+ @mkdir $@
+
+$(OBJDIR)/version.inc: ../configure.ac $(OBJDIR) get_ver.awk
+ @echo Creating $@
+ @$(AWK) -f get_ver.awk $< > $@
+
+$(OBJDIR)/%.o: %.c
+ @echo Compiling $<
+ @$(CC) $(CFLAGS) -c $< -o $@
+
+$(OBJDIR)/rrdcgi.$(CGIEXT): $(OBJCGI) $(OBJDIR)/rrdcgi.res
+ @echo Linking $@
+ @-$(RM) $@
+ @$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)
+
+$(OBJDIR)/rrdtool.exe: $(OBJTOOL) $(OBJDIR)/rrdtool.res
+ @echo Linking $@
+ @-$(RM) $@
+ @$(LD) $(LDFLAGS) $^ -o $@ $(LIBPATH) $(LDLIBS)
+
+$(OBJDIR)/librrd.$(LIBEXT): $(OBJS)
+ @echo Creating $@
+ @-$(RM) $@
+ @$(AR) $(ARFLAGS) $@ $^
+
+$(OBJDIR)/%.res: $(OBJDIR)/%.rc
+ @echo Creating $@
+ @$(RC) $(RCFLAGS) $< -o $@
+
+$(OBJDIR)/%.rc: Makefile.Win32 $(OBJDIR)/version.inc
+ @echo 1 VERSIONINFO > $@
+ @echo FILEVERSION $(RRD_VERSION),0 >> $@
+ @echo PRODUCTVERSION $(RRD_VERSION),0 >> $@
+ @echo FILEFLAGSMASK 0x3fL >> $@
+ @echo FILEOS 0x40004L >> $@
+ @echo FILEFLAGS 0x0L >> $@
+ @echo FILETYPE 0x1L >> $@
+ @echo FILESUBTYPE 0x0L >> $@
+ @echo BEGIN >> $@
+ @echo BLOCK "StringFileInfo" >> $@
+ @echo BEGIN >> $@
+ @echo BLOCK "040904E4" >> $@
+ @echo BEGIN >> $@
+ @echo VALUE "LegalCopyright","$(COPYR)\0" >> $@
+ifdef COMPANY
+ @echo VALUE "CompanyName","$(COMPANY)\0" >> $@
+endif
+ @echo VALUE "ProductName","$(notdir $(@:.rc=.exe))\0" >> $@
+ @echo VALUE "ProductVersion","$(RRD_VERSION_STR)\0" >> $@
+ @echo VALUE "License","Released under GPL.\0" >> $@
+ @echo VALUE "FileDescription","$(DESCR)\0" >> $@
+ @echo VALUE "FileVersion","$(RRD_VERSION_STR)\0" >> $@
+ @echo VALUE "InternalName","$(notdir $(@:.rc=))\0" >> $@
+ @echo VALUE "OriginalFilename","$(notdir $(@:.rc=.exe))\0" >> $@
+ @echo VALUE "WWW","$(WWWURL)\0" >> $@
+ @echo END >> $@
+ @echo END >> $@
+ @echo BLOCK "VarFileInfo" >> $@
+ @echo BEGIN >> $@
+ @echo VALUE "Translation", 0x409, 1252 >> $@
+ @echo END >> $@
+ @echo END >> $@
+ifdef ICON
+ @echo 1 ICON DISCARDABLE "$(ICON)" >> $@
+endif
+
+config.h: Makefile.Win32 $(OBJDIR)/version.inc
+ @echo Creating $@
+ @echo $(DL)/* $@ for NetWare target.$(DL) > $@
+ @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
+ @echo $(DL)** All your changes will be lost!!$(DL) >> $@
+ @echo $(DL)*/$(DL) >> $@
+ @echo $(DL)#define OS "i586-pc-Win32"$(DL) >> $@
+ @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@
+ @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@
+ @echo $(DL)#define NUMVERS $(RRD_NUMVERS)$(DL) >> $@
+ @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
+# @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MATH_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_MBSTOWCS 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
+# @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDARG_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDDEF_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
+# @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
+ @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
+# @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TERMIOS_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
+ @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
+ @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
+ @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
+ @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
+ifdef NO_NULL_REALLOC
+ @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@
+ @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@
+else
+ @echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@
+endif
+ @echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@
+ @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@
+ @echo $(DL)#define strftime strftime_$(DL) >> $@
+ifdef WITH_PIECHART
+ @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@
+endif
+
+$(DISTDIR)/readme.txt: Makefile.Win32
+ @echo Creating $@
+ @echo $(DL)This is a binary distribution for Win32 platform.$(DL) > $@
+ @echo $(DL)RRDTool version $(RRD_VERSION_STR)$(DL) >> $@
+ @echo $(DL)Please download the complete RRDTool package for$(DL) >> $@
+ @echo $(DL)any further documentation:$(DL) >> $@
+ @echo $(DL)$(WWWURL)$(DL) >> $@
+
+