From 57b26cdddad2ea4bee44bee1100ab516f824b53e Mon Sep 17 00:00:00 2001 From: oetiker Date: Sun, 10 Sep 2006 19:20:59 +0000 Subject: [PATCH] netware und win32 fixes from guenter git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@891 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/netware/Makefile | 63 ++++++++++++++++++++++++++++++++++------ program/win32/Makefile | 56 +++++++++++++++++++++++++++++++---- 2 files changed, 104 insertions(+), 15 deletions(-) diff --git a/program/netware/Makefile b/program/netware/Makefile index d28dba1d..a38ac708 100644 --- a/program/netware/Makefile +++ b/program/netware/Makefile @@ -1,6 +1,6 @@ -# Gnu Makefile for NetWare target * 25-Aug-2006 +# Gnu Makefile for NetWare target * 09-Sep-2006 # for use with gcc/nlmconv or Metrowerks CodeWarrior compiler -# use with: make -f Makefile [all|clean|dist|distclean|help] +# use with: make -f Makefile [help|all|clean|dev|devclean|dist|distclean] DESCR = Round Robin Database Tool $(RRD_VERSION_STR) COPYR = Copyright (c) 1997-2006 by Tobias Oetiker @@ -58,7 +58,13 @@ endif ifndef DISTDIR DISTDIR = rrdtool-$(RRD_VERSION_STR)-nw endif -ARCHIVE = $(DISTDIR).zip +DISTARC = $(DISTDIR).zip + +# Edit the path below to point to your distribution folder. +ifndef DEVLDIR +DEVLDIR = rrdtool-$(RRD_VERSION_STR)-sdk-nw +endif +DEVLARC = $(DEVLDIR).zip # whatever... # NO_NULL_REALLOC = 1 @@ -149,6 +155,9 @@ endif ifeq ($(findstring linux,$(OSTYPE)),linux) #include $(NDKBASE)/nlmconv/ncpfs.inc DL = ' +DS = / +else +DS = \\ endif ifeq ($(MTSAFE),YES) @@ -287,8 +296,24 @@ dist: all $(DISTDIR) $(DISTDIR)/readme.txt @-$(CP) $(PROOT)/COPYRIGHT $(DISTDIR) @-$(CP) $(PROOT)/NEWS $(DISTDIR) @-$(CP) $(PROOT)/README $(DISTDIR) - @echo Creating $(ARCHIVE) - @$(ZIP) $(ARCHIVE) $(DISTDIR)/* < $(DISTDIR)/readme.txt + @echo Creating $(DISTARC) + @$(ZIP) $(DISTARC) $(DISTDIR)/* < $(DISTDIR)/readme.txt + +dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt + @-mkdir $(DEVLDIR)$(DS)include + @-mkdir $(DEVLDIR)$(DS)lib + @-mkdir $(DEVLDIR)$(DS)src + @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DEVLDIR)/lib + @-$(CP) $(PROOT)/config.h $(DEVLDIR)/include + @-$(CP) $(PROOT)/src/rrd.h $(DEVLDIR)/include + @-$(CP) $(PROOT)/src/*.ttf $(DEVLDIR)/src + @-$(CP) $(PROOT)/CHANGES $(DEVLDIR) + @-$(CP) $(PROOT)/COPYING $(DEVLDIR) + @-$(CP) $(PROOT)/COPYRIGHT $(DEVLDIR) + @-$(CP) $(PROOT)/NEWS $(DEVLDIR) + @-$(CP) $(PROOT)/README $(DEVLDIR) + @echo Creating $(DEVLARC) + @$(ZIP) $(DEVLARC) $(DEVLDIR)/* < $(DEVLDIR)/readme.txt clean: -$(RM) -r $(OBJDIR) @@ -296,7 +321,11 @@ clean: distclean: clean -$(RM) -r $(DISTDIR) - -$(RM) $(ARCHIVE) + -$(RM) $(DISTARC) + +devclean: clean + -$(RM) -r $(DEVLDIR) + -$(RM) $(DEVLARC) $(OBJDIR): @mkdir $@ @@ -304,14 +333,17 @@ $(OBJDIR): $(DISTDIR): @mkdir $@ -$(OBJDIR)/%.o: %.c - @echo Compiling $< - @$(CC) $(CFLAGS) -c $< -o $@ +$(DEVLDIR): + @mkdir $@ $(OBJDIR)/version.inc: $(PROOT)/configure.ac $(OBJDIR) $(PROOT)/src/get_ver.awk @echo Creating $@ @$(AWK) -f $(PROOT)/src/get_ver.awk $< > $@ +$(OBJDIR)/%.o: %.c + @echo Compiling $< + @$(CC) $(CFLAGS) -c $< -o $@ + $(OBJDIR)/rrdcgi.$(CGIEXT): $(OBJCGI) $(OBJDIR)/rrdcgi.def $(OBJDIR)/rrdcgi.xdc @echo Linking $@ @-$(RM) $@ @@ -400,6 +432,9 @@ $(PROOT)/config.h: Makefile @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)#ifndef NETWARE$(DL) >> $@ + @echo $(DL)#error This config.h is created for NetWare platform!$(DL) >> $@ + @echo $(DL)#endif$(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) >> $@ @@ -474,6 +509,14 @@ $(DISTDIR)/readme.txt: Makefile @echo $(DL)any further documentation:$(DL) >> $@ @echo $(DL)$(WWWURL)$(DL) >> $@ +$(DEVLDIR)/readme.txt: Makefile + @echo Creating $@ + @echo $(DL)This is a development 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) >> $@ + help: @echo $(DL)===========================================================$(DL) @echo $(DL)Novell NDK Base = $(NDKBASE)$(DL) @@ -488,6 +531,8 @@ help: @echo $(DL)$(MAKE) rrdcgi$(DL) @echo $(DL)$(MAKE) librrd$(DL) @echo $(DL)$(MAKE) clean$(DL) + @echo $(DL)$(MAKE) dev$(DL) + @echo $(DL)$(MAKE) devclean$(DL) @echo $(DL)$(MAKE) dist$(DL) @echo $(DL)$(MAKE) distclean$(DL) @echo $(DL)===========================================================$(DL) diff --git a/program/win32/Makefile b/program/win32/Makefile index c82a1119..7ed9c769 100644 --- a/program/win32/Makefile +++ b/program/win32/Makefile @@ -1,6 +1,6 @@ -# Gnu Makefile for Win32 target * 25-Aug-2006 +# Gnu Makefile for Win32 target * 09-Sep-2006 # for use with MingW32 gcc or Metrowerks CodeWarrior compiler -# use with: make -f Makefile [all|clean|dist|distclean|help] +# use with: make -f Makefile [help|all|clean|dev|devclean|dist|distclean] DESCR = Round Robin Database Tool COPYR = Copyright (c) 1997-2006 by Tobias Oetiker @@ -50,7 +50,13 @@ endif ifndef DISTDIR DISTDIR = rrdtool-$(RRD_VERSION_STR)-w32 endif -ARCHIVE = $(DISTDIR).zip +DISTARC = $(DISTDIR).zip + +# Edit the path below to point to your distribution folder. +ifndef DEVLDIR +DEVLDIR = rrdtool-$(RRD_VERSION_STR)-sdk-w32 +endif +DEVLARC = $(DEVLDIR).zip # whatever... NO_NULL_REALLOC = 1 @@ -114,6 +120,8 @@ RCFLAGS = -I rc -O coff -i CFLAGS += -fno-strict-aliasing -Wall -Wno-unused # -pedantic endif +DS = \\ + ifndef COPYR COPYR = Copyright (c) 2006 The Open Source Community. endif @@ -235,8 +243,24 @@ dist: all $(DISTDIR) $(DISTDIR)/readme.txt @-$(CP) $(PROOT)/COPYRIGHT $(DISTDIR) @-$(CP) $(PROOT)/NEWS $(DISTDIR) @-$(CP) $(PROOT)/README $(DISTDIR) - @echo Creating $(ARCHIVE) - @$(ZIP) $(ARCHIVE) $(DISTDIR)/* < $(DISTDIR)/readme.txt + @echo Creating $(DISTARC) + @$(ZIP) $(DISTARC) $(DISTDIR)/* < $(DISTDIR)/readme.txt + +dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt + @-mkdir $(DEVLDIR)$(DS)include + @-mkdir $(DEVLDIR)$(DS)lib + @-mkdir $(DEVLDIR)$(DS)src + @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DEVLDIR)/lib + @-$(CP) $(PROOT)/config.h $(DEVLDIR)/include + @-$(CP) $(PROOT)/src/rrd.h $(DEVLDIR)/include + @-$(CP) $(PROOT)/src/*.ttf $(DEVLDIR)/src + @-$(CP) $(PROOT)/CHANGES $(DEVLDIR) + @-$(CP) $(PROOT)/COPYING $(DEVLDIR) + @-$(CP) $(PROOT)/COPYRIGHT $(DEVLDIR) + @-$(CP) $(PROOT)/NEWS $(DEVLDIR) + @-$(CP) $(PROOT)/README $(DEVLDIR) + @echo Creating $(DEVLARC) + @$(ZIP) $(DEVLARC) $(DEVLDIR)/* < $(DEVLDIR)/readme.txt clean: -$(RM) -r $(OBJDIR) @@ -244,7 +268,11 @@ clean: distclean: clean -$(RM) -r $(DISTDIR) - -$(RM) $(ARCHIVE) + -$(RM) $(DISTARC) + +devclean: clean + -$(RM) -r $(DEVLDIR) + -$(RM) $(DEVLARC) $(OBJDIR): @mkdir $@ @@ -252,6 +280,9 @@ $(OBJDIR): $(DISTDIR): @mkdir $@ +$(DEVLDIR): + @mkdir $@ + $(OBJDIR)/version.inc: $(PROOT)/configure.ac $(OBJDIR) $(PROOT)/src/get_ver.awk @echo Creating $@ @$(AWK) -f $(PROOT)/src/get_ver.awk $< > $@ @@ -322,6 +353,9 @@ $(PROOT)/config.h: Makefile $(OBJDIR)/version.inc @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)#ifndef WIN32$(DL) >> $@ + @echo $(DL)#error This config.h is created for Win32 platform!$(DL) >> $@ + @echo $(DL)#endif$(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) >> $@ @@ -390,6 +424,14 @@ $(DISTDIR)/readme.txt: Makefile @echo $(DL)any further documentation:$(DL) >> $@ @echo $(DL)$(WWWURL)$(DL) >> $@ +$(DEVLDIR)/readme.txt: Makefile + @echo Creating $@ + @echo $(DL)This is a development 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) >> $@ + help: @echo $(DL)===========================================================$(DL) @echo $(DL)libpng Source = $(LIBPNG)$(DL) @@ -403,6 +445,8 @@ help: @echo $(DL)$(MAKE) rrdcgi$(DL) @echo $(DL)$(MAKE) librrd$(DL) @echo $(DL)$(MAKE) clean$(DL) + @echo $(DL)$(MAKE) dev$(DL) + @echo $(DL)$(MAKE) devclean$(DL) @echo $(DL)$(MAKE) dist$(DL) @echo $(DL)$(MAKE) distclean$(DL) @echo $(DL)===========================================================$(DL) -- 2.30.2