Code

build fixes by Guenter Knauf
[rrdtool.git] / netware / Makefile
index 135f1571e019ebfcf48243e6c1f627d91cd08c6d..104e532789243e2097362e96b4f26aa038a6d321 100644 (file)
@@ -1,9 +1,12 @@
-# Gnu Makefile for NetWare target * 08-Feb-2007
+# Gnu Makefile for NetWare target
 # for use with gcc/nlmconv or Metrowerks CodeWarrior compiler
 # use with: make -f Makefile [help|all|clean|dev|devclean|dist|distclean]
+#
+# $id: $
+#
 
 DESCR  = Round Robin Database Tool $(RRD_VERSION_STR)
-COPYR  = Copyright (c) 1997-2007 by Tobias Oetiker
+COPYR  = Copyright (c) 1997-2008 by Tobias Oetiker
 WWWURL = http://www.rrdtool.org/
 MTSAFE = YES
 #SCREEN        = $(DESCR)
@@ -39,11 +42,11 @@ 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.16
+LIBPNG = $(LIBBASE)/libpng-1.2.29
 endif
 # Edit the path below to point to your freetype sources or set environment var.
 ifndef LIBFT2
-LIBFT2 = $(LIBBASE)/freetype-2.3.1
+LIBFT2 = $(LIBBASE)/freetype-2.3.7
 endif
 # Edit the path below to point to your libart sources or set environment var.
 ifndef LIBART
@@ -58,13 +61,17 @@ endif
 ifndef DISTDIR
 DISTDIR        = rrdtool-$(RRD_VERSION_STR)-nw
 endif
-DISTARC = $(DISTDIR).zip
+ifndef DISTARC
+DISTARC = $(DISTDIR).$(ARCEXT)
+endif
 
 # Edit the path below to point to your distribution folder.
 ifndef DEVLDIR
 DEVLDIR        = rrdtool-$(RRD_VERSION_STR)-sdk-nw
 endif
-DEVLARC = $(DEVLDIR).zip
+ifndef DEVLARC
+DEVLARC = $(DEVLDIR).$(ARCEXT)
+endif
 
 # whatever...
 # NO_NULL_REALLOC = 1
@@ -95,9 +102,15 @@ 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
 MV     = mv -fv
 
+ifeq ($(ARCEXT),7z)
+ARCBIN = 7za a
+else
+ARCBIN = zip -qzr9
+ARCEXT = zip
+endif
+
 # must be equal to DEBUG or NDEBUG
 DB     = NDEBUG
 # DB   = DEBUG
@@ -124,8 +137,9 @@ ifeq ($(CC),mwccnlm)
 LD     = mwldnlm
 LDFLAGS        = -nostdlib $^ $(PRELUDE) $(LDLIBS) -o $@ -commandfile
 AR     = $(LD)
-ARFLAGS        = -type library -w nocmdline $(OBJS) -o
+ARFLAGS        = -nostdlib -type library -o
 LIBEXT = lib
+#RANLIB        =
 CFLAGS += -gccinc -inline off -opt nointrinsics -proc 586
 CFLAGS += -relax_pointers
 #CFLAGS        += -w on,nounused,nounusedexpr # -ansi strict
@@ -143,6 +157,7 @@ LDFLAGS     = -T
 AR     = ar
 ARFLAGS        = -cq
 LIBEXT = a
+RANLIB = ranlib
 CFLAGS += -fno-builtin -fpcc-struct-return -fno-strict-aliasing
 CFLAGS += -Wall -Wno-unused # -pedantic
 ifeq ($(LIBARCH),LIBC)
@@ -218,9 +233,9 @@ RRDLIBOBJS  = \
        $(EOLIST)
 
 XLIBOBJS       = \
+       $(OBJDIR)/rrd_getopt.o \
+       $(OBJDIR)/rrd_getopt1.o \
        $(OBJDIR)/art_rgba_svp.o \
-       $(OBJDIR)/getopt.o \
-       $(OBJDIR)/getopt1.o \
        $(OBJDIR)/hash_32.o \
        $(OBJDIR)/parsetime.o \
        $(OBJDIR)/pngsize.o \
@@ -276,7 +291,7 @@ 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)
+LDLIBS += $(LIBFT2)/builds/netware/LIBC/libft2.$(LIBEXT)
 
 
 all: rrdtool rrdcgi
@@ -297,7 +312,7 @@ dist: all $(DISTDIR) $(DISTDIR)/readme.txt
        @-$(CP) $(PROOT)/NEWS $(DISTDIR)
        @-$(CP) $(PROOT)/README $(DISTDIR)
        @echo Creating $(DISTARC)
-       @$(ZIP) $(DISTARC) $(DISTDIR)/* < $(DISTDIR)/readme.txt
+       @$(ARCBIN) $(DISTARC) $(DISTDIR)/* < $(DISTDIR)/readme.txt
 
 dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt
        @-mkdir $(DEVLDIR)$(DS)include
@@ -313,7 +328,7 @@ dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt
        @-$(CP) $(PROOT)/NEWS $(DEVLDIR)
        @-$(CP) $(PROOT)/README $(DEVLDIR)
        @echo Creating $(DEVLARC)
-       @$(ZIP) $(DEVLARC) $(DEVLDIR)/* < $(DEVLDIR)/readme.txt
+       @$(ARCBIN) $(DEVLARC) $(DEVLDIR)/* < $(DEVLDIR)/readme.txt
 
 clean:
        -$(RM) -r $(OBJDIR)
@@ -369,6 +384,9 @@ $(OBJDIR)/librrd.$(LIBEXT): $(OBJS)
        @echo Creating $@
        @-$(RM) $@
        @$(AR) $(ARFLAGS) $@ $^
+ifdef RANLIB
+       @$(RANLIB) $@
+endif
 
 $(OBJDIR)/%.xdc: Makefile
        @echo Creating $@
@@ -468,7 +486,6 @@ $(PROOT)/rrd_config.h: FORCE Makefile $(OBJDIR)/version.inc
        @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) >> $@
@@ -489,7 +506,6 @@ $(PROOT)/rrd_config.h: FORCE Makefile $(OBJDIR)/version.inc
        @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_UNISTD_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_VSNPRINTF 1$(DL) >> $@
        @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
        @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
@@ -506,7 +522,7 @@ ifdef RRD_DEFAULT_FONT
 endif
        @echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@
 ifdef WITH_PIECHART
-       @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@
+       @echo $(DL)#define WITH_PIECHART $(WITH_PIECHART)$(DL) >> $@
 endif
        @echo $(DL)#endif /* RRD_CONFIG_H */$(DL) >> $@