netware und win32 fixes from guenter
[rrdtool.git] / netware / Makefile
1 # Gnu Makefile for NetWare target * 09-Sep-2006
2 # for use with gcc/nlmconv or Metrowerks CodeWarrior compiler
3 # use with: make -f Makefile [help|all|clean|dev|devclean|dist|distclean]
4
5 DESCR   = Round Robin Database Tool $(RRD_VERSION_STR)
6 COPYR   = Copyright (c) 1997-2006 by Tobias Oetiker
7 WWWURL  = http://www.rrdtool.org/
8 MTSAFE  = YES
9 #SCREEN = $(DESCR)
10 STACK   = 65535
11 # Comment the line below if you dont want to load protected automatically.
12 #LDRING = 3
13
14 # You can set the default font used in graphs.
15 # If not set here RRD defaults to DejaVuSansMono-Roman.ttf
16 #RRD_DEFAULT_FONT = "sys:/java/nwgfx/lib/x11/fonts/ttf/tt0003m_.ttf"
17 #RRD_DEFAULT_FONT = "VeraMono.ttf"
18
19 # Vertical label angle: 90.0 (default) or 270.0
20 RRDGRAPH_YLEGEND_ANGLE = 90.0
21
22 # Set to one if you want to have piecharts.
23 WITH_PIECHART = 0
24
25 # Set the extension used for rrdcgi.
26 ifndef CGIEXT
27 CGIEXT  = nlm
28 endif
29
30 # Edit the path below to point to your Novell NDK.
31 ifndef NDKBASE
32 NDKBASE = c:/novell
33 endif
34
35 # Base for the lib sources
36 ifndef LIBBASE
37 LIBBASE = ../..
38 endif
39 # All library code is statically linked to avoid problems with other lib NLMs.
40 # Edit the path below to point to your libpng sources or set environment var.
41 ifndef LIBPNG
42 LIBPNG  = $(LIBBASE)/libpng-1.2.12
43 endif
44 # Edit the path below to point to your freetype sources or set environment var.
45 ifndef LIBFT2
46 LIBFT2  = $(LIBBASE)/freetype-2.2.1
47 endif
48 # Edit the path below to point to your libart sources or set environment var.
49 ifndef LIBART
50 LIBART  = $(LIBBASE)/libart_lgpl-2.3.17
51 endif
52 # Edit the path below to point to your zlib sources or set environment var.
53 ifndef ZLIBSDK
54 ZLIBSDK = $(LIBBASE)/zlib-1.2.3
55 endif
56
57 # Edit the path below to point to your distribution folder.
58 ifndef DISTDIR
59 DISTDIR = rrdtool-$(RRD_VERSION_STR)-nw
60 endif
61 DISTARC = $(DISTDIR).zip
62
63 # Edit the path below to point to your distribution folder.
64 ifndef DEVLDIR
65 DEVLDIR = rrdtool-$(RRD_VERSION_STR)-sdk-nw
66 endif
67 DEVLARC = $(DEVLDIR).zip
68
69 # whatever...
70 # NO_NULL_REALLOC = 1
71
72 # Edit the var below to point to your lib architecture.
73 ifndef LIBARCH
74 # LIBARCH = CLIB
75 LIBARCH = LIBC
76 endif
77
78 # The following line defines your compiler.
79 ifdef METROWERKS
80         CC = mwccnlm
81 else
82         CC = gcc
83 endif
84 # RM    = rm -f
85 CP      = cp -afv
86 # if you want to mark the target as MTSAFE you will need a tool for
87 # generating the xdc data for the linker; here's a minimal tool:
88 # http://www.gknw.net/development/prgtools/mkxdc.zip
89 MPKXDC  = mkxdc
90 # CodeWarrior is too stupid to set the internal name properly when
91 # the extension is not a NLM and not a registered type. So we need
92 # to fix that after linking (since CGI isnt a known type - argh!):
93 # http://www.gknw.net/development/prgtools/fixnlmname.zip
94 FIXNLMN = fixnlmname #-q
95 # Here you can find a native Win32 binary of the original awk:
96 # http://www.gknw.net/development/prgtools/awk.zip
97 AWK     = awk
98 ZIP     = zip -qzR9
99
100 # must be equal to DEBUG or NDEBUG
101 DB      = NDEBUG
102 # DB    = DEBUG
103 # Optimization: -O<n> or debugging: -g
104 ifeq ($(DB),NDEBUG)
105         OPT     = -O2
106         OBJDIR  = release
107 else
108         OPT     = -g
109         OBJDIR  = debug
110 endif
111
112 # Project root
113 PROOT   = ..
114
115 # Include the version info retrieved from source.
116 -include $(OBJDIR)/version.inc
117
118 # Global flags for all compilers
119 CFLAGS  = $(OPT) -D$(DB) -nostdinc -DNETWARE -DN_PLAT_NLM -D_POSIX_SOURCE
120 CFLAGS  += -DHAVE_CONFIG_H
121
122 ifeq ($(CC),mwccnlm)
123 LD      = mwldnlm
124 LDFLAGS = -nostdlib $^ $(PRELUDE) $(LDLIBS) -o $@ -commandfile
125 AR      = $(LD)
126 ARFLAGS = -type library -w nocmdline $(OBJS) -o
127 LIBEXT  = lib
128 CFLAGS  += -gccinc -inline off -opt nointrinsics -proc 586
129 CFLAGS  += -relax_pointers
130 #CFLAGS += -w on,nounused,nounusedexpr # -ansi strict
131 ifeq ($(LIBARCH),LIBC)
132         PRELUDE = $(SDK_LIBC)/imports/libcpre.o
133         CFLAGS += -align 4
134 else
135         PRELUDE = "$(METROWERKS)/Novell Support/libraries/runtime/prelude.obj"
136         CFLAGS += -include "$(METROWERKS)/Novell Support/headers/nlm_prefix.h"
137         CFLAGS += -align 1
138 endif
139 else
140 LD      = nlmconv
141 LDFLAGS = -T
142 AR      = ar
143 ARFLAGS = -cq
144 LIBEXT  = a
145 CFLAGS  += -fno-builtin -fpack-struct -fpcc-struct-return -fno-strict-aliasing
146 CFLAGS  += -Wall -Wno-unused # -pedantic
147 ifeq ($(LIBARCH),LIBC)
148         PRELUDE = $(SDK_LIBC)/imports/libcpre.gcc.o
149 else
150         PRELUDE = $(NDK_ROOT)/pre/prelude.o
151         CFLAGS += -include $(NDKBASE)/nlmconv/genlm.h
152 endif
153 endif
154
155 ifeq ($(findstring linux,$(OSTYPE)),linux)
156 #include $(NDKBASE)/nlmconv/ncpfs.inc
157 DL      = '
158 DS      = /
159 else
160 DS      = \\
161 endif
162
163 ifeq ($(MTSAFE),YES)
164         XDCOPT = -n
165 endif
166 ifeq ($(MTSAFE),NO)
167         XDCOPT = -u
168 endif
169 ifndef COPYR
170         COPYR = Copyright (c) 2006 The Open Source Community.
171 endif
172 ifndef DESCR
173         DESCR = $(notdir $(@:.def=)) Command Extension
174 endif
175 DESCR += ($(LIBARCH)) - $(CC) build
176
177 NDK_ROOT = $(NDKBASE)/ndk
178 SDK_CLIB = $(NDK_ROOT)/nwsdk
179 SDK_LIBC = $(NDK_ROOT)/libc
180
181 INCLUDES += -I$(PROOT) -I$(PROOT)/src -I$(LIBPNG) -I$(LIBFT2)/include -I$(LIBART) -I$(ZLIBSDK)
182
183 ifeq ($(LIBARCH),LIBC)
184         INCLUDES += -I$(SDK_LIBC)/include -I$(SDK_LIBC)/include/nks
185 else
186         INCLUDES += -I$(SDK_CLIB)/include/nlm -I$(SDK_CLIB)/include
187 endif
188
189 CFLAGS += $(INCLUDES)
190
191 vpath %.c $(PROOT)/src $(LIBPNG) $(LIBART)/libart_lgpl $(ZLIBSDK)
192
193 RRDLIBOBJS      = \
194         $(OBJDIR)/rrd_afm.o \
195         $(OBJDIR)/rrd_afm_data.o \
196         $(OBJDIR)/rrd_create.o \
197         $(OBJDIR)/rrd_diff.o \
198         $(OBJDIR)/rrd_dump.o \
199         $(OBJDIR)/rrd_error.o \
200         $(OBJDIR)/rrd_fetch.o \
201         $(OBJDIR)/rrd_first.o \
202         $(OBJDIR)/rrd_format.o \
203         $(OBJDIR)/rrd_gfx.o \
204         $(OBJDIR)/rrd_graph.o \
205         $(OBJDIR)/rrd_graph_helper.o \
206         $(OBJDIR)/rrd_hw.o \
207         $(OBJDIR)/rrd_info.o \
208         $(OBJDIR)/rrd_last.o \
209         $(OBJDIR)/rrd_nan_inf.o \
210         $(OBJDIR)/rrd_open.o \
211         $(OBJDIR)/rrd_resize.o \
212         $(OBJDIR)/rrd_restore.o \
213         $(OBJDIR)/rrd_rpncalc.o \
214         $(OBJDIR)/rrd_tune.o \
215         $(OBJDIR)/rrd_update.o \
216         $(OBJDIR)/rrd_version.o \
217         $(OBJDIR)/rrd_xport.o \
218         $(OBJDIR)/rrd_thread_safe.o \
219         $(EOLIST)
220
221 XLIBOBJS        = \
222         $(OBJDIR)/art_rgba_svp.o \
223         $(OBJDIR)/getopt.o \
224         $(OBJDIR)/getopt1.o \
225         $(OBJDIR)/hash_32.o \
226         $(OBJDIR)/parsetime.o \
227         $(OBJDIR)/pngsize.o \
228         $(EOLIST)
229
230 PNGLIBOBJS      = \
231         $(OBJDIR)/png.o \
232         $(OBJDIR)/pngerror.o \
233         $(OBJDIR)/pngget.o \
234         $(OBJDIR)/pngmem.o \
235         $(OBJDIR)/pngpread.o \
236         $(OBJDIR)/pngread.o \
237         $(OBJDIR)/pngrio.o \
238         $(OBJDIR)/pngrtran.o \
239         $(OBJDIR)/pngrutil.o \
240         $(OBJDIR)/pngset.o \
241         $(OBJDIR)/pngtrans.o \
242         $(OBJDIR)/pngwio.o \
243         $(OBJDIR)/pngwrite.o \
244         $(OBJDIR)/pngwtran.o \
245         $(OBJDIR)/pngwutil.o \
246         $(EOLIST)
247 ifeq "$(wildcard $(LIBPNG)/pnggccrd.c)" "$(LIBPNG)/pnggccrd.c"
248 PNGLIBOBJS      += \
249         $(OBJDIR)/pnggccrd.o \
250         $(OBJDIR)/pngvcrd.o \
251         $(EOLIST)
252 endif
253
254 ZLIBOBJS        = \
255         $(OBJDIR)/adler32.o \
256         $(OBJDIR)/compress.o \
257         $(OBJDIR)/crc32.o \
258         $(OBJDIR)/deflate.o \
259         $(OBJDIR)/inflate.o \
260         $(OBJDIR)/inffast.o \
261         $(OBJDIR)/inftrees.o \
262         $(OBJDIR)/trees.o \
263         $(OBJDIR)/zutil.o \
264         $(EOLIST)
265 ifeq "$(wildcard $(ZLIBSDK)/infblock.c)" "$(ZLIBSDK)/infblock.c"
266 ZLIBOBJS        += \
267         $(OBJDIR)/infblock.o \
268         $(OBJDIR)/infcodes.o \
269         $(OBJDIR)/infutil.o \
270         $(EOLIST)
271 endif
272
273 ARTLIBOBJS      = \
274         $(patsubst $(LIBART)/libart_lgpl/%.c,$(OBJDIR)/%.o,$(wildcard $(LIBART)/libart_lgpl/art_*.c))
275
276 OBJS    := $(RRDLIBOBJS) $(XLIBOBJS) $(PNGLIBOBJS) $(ARTLIBOBJS) $(ZLIBOBJS)
277 OBJCGI  := $(OBJS) $(OBJDIR)/rrd_cgi.o
278 OBJTOOL := $(OBJS) $(OBJDIR)/rrd_tool.o
279
280 LDLIBS  += $(LIBFT2)/builds/netware/libc/libft2.$(LIBEXT)
281
282
283 all: rrdtool rrdcgi
284
285 rrdtool: $(OBJDIR) $(PROOT)/config.h $(OBJDIR)/rrdtool.nlm
286 rrdcgi: $(OBJDIR) $(PROOT)/config.h $(OBJDIR)/rrdcgi.$(CGIEXT)
287 librrd: $(OBJDIR) $(PROOT)/config.h $(OBJDIR)/librrd.$(LIBEXT)
288
289 dist: all $(DISTDIR) $(DISTDIR)/readme.txt
290 #       @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR)
291         @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)
292         @-$(CP) $(OBJDIR)/rrdtool.nlm $(DISTDIR)
293         @-$(CP) $(PROOT)/src/*.ttf $(DISTDIR)
294         @-$(CP) $(PROOT)/CHANGES $(DISTDIR)
295         @-$(CP) $(PROOT)/COPYING $(DISTDIR)
296         @-$(CP) $(PROOT)/COPYRIGHT $(DISTDIR)
297         @-$(CP) $(PROOT)/NEWS $(DISTDIR)
298         @-$(CP) $(PROOT)/README $(DISTDIR)
299         @echo Creating $(DISTARC)
300         @$(ZIP) $(DISTARC) $(DISTDIR)/* < $(DISTDIR)/readme.txt
301
302 dev: librrd $(DEVLDIR) $(DEVLDIR)/readme.txt
303         @-mkdir $(DEVLDIR)$(DS)include
304         @-mkdir $(DEVLDIR)$(DS)lib
305         @-mkdir $(DEVLDIR)$(DS)src
306         @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DEVLDIR)/lib
307         @-$(CP) $(PROOT)/config.h $(DEVLDIR)/include
308         @-$(CP) $(PROOT)/src/rrd.h $(DEVLDIR)/include
309         @-$(CP) $(PROOT)/src/*.ttf $(DEVLDIR)/src
310         @-$(CP) $(PROOT)/CHANGES $(DEVLDIR)
311         @-$(CP) $(PROOT)/COPYING $(DEVLDIR)
312         @-$(CP) $(PROOT)/COPYRIGHT $(DEVLDIR)
313         @-$(CP) $(PROOT)/NEWS $(DEVLDIR)
314         @-$(CP) $(PROOT)/README $(DEVLDIR)
315         @echo Creating $(DEVLARC)
316         @$(ZIP) $(DEVLARC) $(DEVLDIR)/* < $(DEVLDIR)/readme.txt
317
318 clean:
319         -$(RM) -r $(OBJDIR)
320         -$(RM) $(PROOT)/config.h
321
322 distclean: clean
323         -$(RM) -r $(DISTDIR)
324         -$(RM) $(DISTARC)
325
326 devclean: clean
327         -$(RM) -r $(DEVLDIR)
328         -$(RM) $(DEVLARC)
329
330 $(OBJDIR):
331         @mkdir $@
332
333 $(DISTDIR):
334         @mkdir $@
335
336 $(DEVLDIR):
337         @mkdir $@
338
339 $(OBJDIR)/version.inc: $(PROOT)/configure.ac $(OBJDIR) $(PROOT)/src/get_ver.awk
340         @echo Creating $@
341         @$(AWK) -f $(PROOT)/src/get_ver.awk $< > $@
342
343 $(OBJDIR)/%.o: %.c
344         @echo Compiling $<
345         @$(CC) $(CFLAGS) -c $< -o $@
346
347 $(OBJDIR)/rrdcgi.$(CGIEXT): $(OBJCGI) $(OBJDIR)/rrdcgi.def $(OBJDIR)/rrdcgi.xdc
348         @echo Linking $@
349         @-$(RM) $@
350         @$(LD) $(LDFLAGS) $(@:.$(CGIEXT)=.def)
351 ifneq ($(CGIEXT),nlm)
352 ifeq ($(LD),mwldnlm)
353         @$(FIXNLMN) $@
354 endif
355 endif
356
357 $(OBJDIR)/rrdtool.nlm: $(OBJTOOL) $(OBJDIR)/rrdtool.def $(OBJDIR)/rrdtool.xdc
358         @echo Linking $@
359         @-$(RM) $@
360         @$(LD) $(LDFLAGS) $(@:.nlm=.def)
361
362 $(OBJDIR)/librrd.$(LIBEXT): $(OBJS)
363         @echo Creating $@
364         @-$(RM) $@
365         @$(AR) $(ARFLAGS) $@ $^
366
367 $(OBJDIR)/%.xdc: Makefile
368         @echo Creating $@
369         @$(MPKXDC) $(XDCOPT) $@
370
371 $(OBJDIR)/%.def: Makefile $(OBJDIR)/version.inc
372         @echo $(DL)# DEF Linker File for use with gcc and nlmconv$(DL) > $@
373         @echo $(DL)# or with Codewarrior command line compiler.$(DL) >> $@
374         @echo $(DL)# Do not edit this file - it is created by make!$(DL) >> $@
375         @echo $(DL)# All your changes will be lost!!$(DL) >> $@
376         @echo $(DL)#$(DL) >> $@
377         @echo $(DL)copyright "$(COPYR)"$(DL) >> $@
378         @echo $(DL)description "$(DESCR)"$(DL) >> $@
379         @echo $(DL)version $(RRD_VERSION)$(DL) >> $@
380 ifdef NLMTYPE
381         @echo $(DL)type $(NLMTYPE)$(DL) >> $@
382 else
383         @echo $(DL)type 0$(DL) >> $@
384 endif
385 ifdef STACK
386         @echo $(DL)stack $(STACK)$(DL) >> $@
387 endif
388         @echo $(DL)threadname "$(notdir $(@:.def=))"$(DL) >> $@
389 ifdef SCREEN
390         @echo $(DL)screenname "$(SCREEN)"$(DL) >> $@
391 else
392         @echo $(DL)screenname "DEFAULT"$(DL) >> $@
393 endif
394 ifeq ($(DB),DEBUG)
395         @echo $(DL)debug$(DL) >> $@
396 endif
397 ifeq ($(LIBARCH),CLIB)
398         @echo $(DL)start _Prelude$(DL) >> $@
399         @echo $(DL)exit _Stop$(DL) >> $@
400         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/clib.imp$(DL) >> $@
401         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/threads.imp$(DL) >> $@
402         @echo $(DL)import @$(NDK_ROOT)/nwsdk/imports/nlmlib.imp$(DL) >> $@
403         @echo $(DL)module clib$(DL) >> $@
404 else
405         @echo $(DL)start _LibCPrelude$(DL) >> $@
406         @echo $(DL)exit _LibCPostlude$(DL) >> $@
407         @echo $(DL)check _LibCCheckUnload$(DL) >> $@
408         @echo $(DL)import @$(NDK_ROOT)/libc/imports/libc.imp$(DL) >> $@
409         @echo $(DL)import @$(NDK_ROOT)/libc/imports/netware.imp$(DL) >> $@
410         @echo $(DL)module libc$(DL) >> $@
411         @echo $(DL)pseudopreemption$(DL) >> $@
412         @echo $(DL)flag_on 64$(DL) >> $@
413 endif
414 ifeq ($(LDRING),0)
415         @echo $(DL)flag_on 16$(DL) >> $@
416 endif
417 ifeq ($(LDRING),3)
418         @echo $(DL)flag_on 512$(DL) >> $@
419 endif
420 ifdef XDCOPT
421         @echo $(DL)xdcdata $(@:.def=.xdc)$(DL) >> $@
422 endif
423 ifeq ($(LD),nlmconv)
424         @echo $(DL)input $(OBJS) $(LDLIBS)$(DL) >> $@
425         @echo $(DL)input $(PRELUDE)$(DL) >> $@
426         @echo $(DL)output $(notdir $(@:.def=.nlm))$(DL) >> $@
427 endif
428
429 $(PROOT)/config.h: Makefile
430         @echo Creating $@
431         @echo $(DL)/* $@ for NetWare target.$(DL) > $@
432         @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
433         @echo $(DL)** All your changes will be lost!!$(DL) >> $@
434         @echo $(DL)*/$(DL) >> $@
435         @echo $(DL)#ifndef NETWARE$(DL) >> $@
436         @echo $(DL)#error This config.h is created for NetWare platform!$(DL) >> $@
437         @echo $(DL)#endif$(DL) >> $@
438         @echo $(DL)#define OS "i586-pc-NetWare"$(DL) >> $@
439         @echo $(DL)#define PACKAGE_VERSION "$(RRD_VERSION_STR)"$(DL) >> $@
440         @echo $(DL)#define PACKAGE_BUGREPORT "tobi@oetiker.ch"$(DL) >> $@
441         @echo $(DL)#define NUMVERS $(RRD_NUMVERS)$(DL) >> $@
442         @echo $(DL)#define HAVE_ASSERT_H 1$(DL) >> $@
443         @echo $(DL)#define HAVE_DLFCN_H 1$(DL) >> $@
444         @echo $(DL)#define HAVE_DLOPEN 1$(DL) >> $@
445         @echo $(DL)#define HAVE_ERR_H 1$(DL) >> $@
446         @echo $(DL)#define HAVE_ERRNO_H 1$(DL) >> $@
447         @echo $(DL)#define HAVE_FCNTL_H 1$(DL) >> $@
448         @echo $(DL)#define HAVE_FIONBIO 1$(DL) >> $@
449         @echo $(DL)#define HAVE_FLOAT_H 1$(DL) >> $@
450         @echo $(DL)#define HAVE_GETTIMEOFDAY 1$(DL) >> $@
451         @echo $(DL)#define HAVE_INTTYPES_H 1$(DL) >> $@
452         @echo $(DL)#define HAVE_LIMITS_H 1$(DL) >> $@
453         @echo $(DL)#define HAVE_LONGLONG 1$(DL) >> $@
454         @echo $(DL)#define HAVE_LOCALE_H 1$(DL) >> $@
455         @echo $(DL)#define HAVE_MALLOC_H 1$(DL) >> $@
456         @echo $(DL)#define HAVE_MATH_H 1$(DL) >> $@
457         @echo $(DL)#define HAVE_MBSTOWCS 1$(DL) >> $@
458         @echo $(DL)#define HAVE_MEMMOVE 1$(DL) >> $@
459         @echo $(DL)#define HAVE_MKTIME 1$(DL) >> $@
460         @echo $(DL)#define HAVE_SELECT 1$(DL) >> $@
461         @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
462         @echo $(DL)#define HAVE_SETJMP_H 1$(DL) >> $@
463 #       @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
464         @echo $(DL)#define HAVE_SNPRINTF 1$(DL) >> $@
465         @echo $(DL)#define HAVE_STDARG_H 1$(DL) >> $@
466         @echo $(DL)#define HAVE_STDDEF_H 1$(DL) >> $@
467         @echo $(DL)#define HAVE_STDINT_H 1$(DL) >> $@
468         @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
469         @echo $(DL)#define HAVE_STRCASECMP 1$(DL) >> $@
470         @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
471         @echo $(DL)#define HAVE_STRFTIME 1$(DL) >> $@
472         @echo $(DL)#define HAVE_STRING_H 1$(DL) >> $@
473         @echo $(DL)#define HAVE_STRLCAT 1$(DL) >> $@
474         @echo $(DL)#define HAVE_STRLCPY 1$(DL) >> $@
475         @echo $(DL)#define HAVE_STRSTR 1$(DL) >> $@
476         @echo $(DL)#define HAVE_SYS_PARAM_H 1$(DL) >> $@
477         @echo $(DL)#define HAVE_SYS_SELECT_H 1$(DL) >> $@
478         @echo $(DL)#define HAVE_SYS_STAT_H 1$(DL) >> $@
479         @echo $(DL)#define HAVE_SYS_TIME_H 1$(DL) >> $@
480         @echo $(DL)#define HAVE_SYS_TYPES_H 1$(DL) >> $@
481         @echo $(DL)#define HAVE_TIME_H 1$(DL) >> $@
482         @echo $(DL)#define HAVE_TZSET 1$(DL) >> $@
483         @echo $(DL)#define HAVE_UNAME 1$(DL) >> $@
484         @echo $(DL)#define HAVE_UNISTD_H 1$(DL) >> $@
485         @echo $(DL)#define HAVE_VSNPRINTF 1$(DL) >> $@
486         @echo $(DL)#define STDC_HEADERS 1$(DL) >> $@
487         @echo $(DL)#define TIME_WITH_SYS_TIME 1$(DL) >> $@
488         @echo $(DL)#define HAVE_ZLIB_H 1$(DL) >> $@
489         @echo $(DL)#define HAVE_LIBZ 1$(DL) >> $@
490 ifdef NO_NULL_REALLOC
491         @echo $(DL)#define NO_NULL_REALLOC 1$(DL) >> $@
492         @echo $(DL)#define rrd_realloc(a,b) ( (a) == NULL ? malloc( (b) ) : realloc( (a) , (b) ))$(DL) >> $@
493 else
494         @echo $(DL)#define rrd_realloc(a,b) realloc((a), (b))$(DL) >> $@
495 endif
496 ifdef RRD_DEFAULT_FONT
497         @echo $(DL)#define RRD_DEFAULT_FONT $(RRD_DEFAULT_FONT)$(DL) >> $@
498 endif
499         @echo $(DL)#define RRDGRAPH_YLEGEND_ANGLE $(RRDGRAPH_YLEGEND_ANGLE)$(DL) >> $@
500 ifdef WITH_PIECHART
501         @echo $(DL)#define WITH_PIECHART 1$(DL) >> $@
502 endif
503
504 $(DISTDIR)/readme.txt: Makefile
505         @echo Creating $@
506         @echo $(DL)This is a binary distribution for NetWare platform.$(DL) > $@
507         @echo $(DL)RRDTool version $(RRD_VERSION_STR)$(DL) >> $@
508         @echo $(DL)Please download the complete RRDTool package for$(DL) >> $@
509         @echo $(DL)any further documentation:$(DL) >> $@
510         @echo $(DL)$(WWWURL)$(DL) >> $@
511
512 $(DEVLDIR)/readme.txt: Makefile
513         @echo Creating $@
514         @echo $(DL)This is a development distribution for NetWare platform.$(DL) > $@
515         @echo $(DL)RRDTool version $(RRD_VERSION_STR)$(DL) >> $@
516         @echo $(DL)Please download the complete RRDTool package for$(DL) >> $@
517         @echo $(DL)any further documentation:$(DL) >> $@
518         @echo $(DL)$(WWWURL)$(DL) >> $@
519
520 help:
521         @echo $(DL)===========================================================$(DL)
522         @echo $(DL)Novell NDK Base = $(NDKBASE)$(DL)
523         @echo $(DL)libpng Source   = $(LIBPNG)$(DL)
524         @echo $(DL)libart Source   = $(LIBART)$(DL)
525         @echo $(DL)Freetype 2 SDK  = $(LIBFT2)$(DL)
526         @echo $(DL)Zlib SDK        = $(ZLIBSDK)$(DL)
527         @echo $(DL)===========================================================$(DL)
528         @echo $(DL)RRDTool $(RRD_VERSION_STR) - available targets are:$(DL)
529         @echo $(DL)$(MAKE) all$(DL)
530         @echo $(DL)$(MAKE) rrdtool$(DL)
531         @echo $(DL)$(MAKE) rrdcgi$(DL)
532         @echo $(DL)$(MAKE) librrd$(DL)
533         @echo $(DL)$(MAKE) clean$(DL)
534         @echo $(DL)$(MAKE) dev$(DL)
535         @echo $(DL)$(MAKE) devclean$(DL)
536         @echo $(DL)$(MAKE) dist$(DL)
537         @echo $(DL)$(MAKE) distclean$(DL)
538         @echo $(DL)===========================================================$(DL)
539
540