more build patches from Günter Knauf
[rrdtool.git] / win32 / Makefile
index b6e90c4..132bfc8 100644 (file)
@@ -1,4 +1,4 @@
-# Gnu Makefile for Win32 target * 29-Jan-2007
+# Gnu Makefile for Win32 target * 08-Feb-2007
 # for use with MingW32 gcc or Metrowerks CodeWarrior compiler
 # use with: make -f Makefile [help|all|clean|dev|devclean|dist|distclean]
 
 # for use with MingW32 gcc or Metrowerks CodeWarrior compiler
 # use with: make -f Makefile [help|all|clean|dev|devclean|dist|distclean]
 
@@ -34,7 +34,7 @@ LIBPNG        = $(LIBBASE)/libpng-1.2.16
 endif
 # Edit the path below to point to your freetype sources or set environment var.
 ifndef LIBFT2
 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)/freetype-2.3.1
 LIBFT2 = $(LIBBASE)/../mingw32/freetype-2.3.1
 endif
 # Edit the path below to point to your libart sources or set environment var.
 LIBFT2 = $(LIBBASE)/../mingw32/freetype-2.3.1
 endif
 # Edit the path below to point to your libart sources or set environment var.
@@ -106,6 +106,7 @@ 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        =
 LDLIBS += -lkernel32.lib -luser32.lib
 LDLIBS += -lMSL_Runtime_x86.lib -lMSL_C_x86.lib -lMSL_Extras_x86.lib
 RCFLAGS        =
+CFLAGS += -DWIN32
 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
 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
@@ -117,7 +118,8 @@ AR  = ar
 ARFLAGS        = -cq
 LIBEXT = a
 RCFLAGS        = -O coff -i
 ARFLAGS        = -cq
 LIBEXT = a
 RCFLAGS        = -O coff -i
-CFLAGS += -fno-strict-aliasing -Wall -Wno-unused # -pedantic
+CFLAGS += -fno-strict-aliasing
+CFLAGS += -Wall -Wno-unused # -pedantic
 endif
 
 ifeq ($(findstring msys,$(OSTYPE)),msys)
 endif
 
 ifeq ($(findstring msys,$(OSTYPE)),msys)
@@ -127,9 +129,6 @@ else
 DS     = \\
 endif
 
 DS     = \\
 endif
 
-ifndef COPYR
-       COPYR = Copyright (c) 2007 The Open Source Community.
-endif
 ifndef DESCR
        DESCR = $(notdir $(@:.rc=)) Command Extension
 endif
 ifndef DESCR
        DESCR = $(notdir $(@:.rc=)) Command Extension
 endif
@@ -239,8 +238,9 @@ rrdtool: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/rrdtool.exe
 rrdcgi: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/rrdcgi.$(CGIEXT)
 librrd: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/librrd.$(LIBEXT)
 
 rrdcgi: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/rrdcgi.$(CGIEXT)
 librrd: $(OBJDIR) $(PROOT)/rrd_config.h $(OBJDIR)/librrd.$(LIBEXT)
 
+FORCE: ;
+
 dist: all $(DISTDIR) $(DISTDIR)/readme.txt
 dist: all $(DISTDIR) $(DISTDIR)/readme.txt
-#      @-$(CP) $(OBJDIR)/librrd.$(LIBEXT) $(DISTDIR)
        @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)
        @-$(CP) $(OBJDIR)/rrdtool.exe $(DISTDIR)
        @-$(CP) $(PROOT)/src/*.ttf $(DISTDIR)
        @-$(CP) $(OBJDIR)/rrdcgi.$(CGIEXT) $(DISTDIR)
        @-$(CP) $(OBJDIR)/rrdtool.exe $(DISTDIR)
        @-$(CP) $(PROOT)/src/*.ttf $(DISTDIR)
@@ -353,7 +353,7 @@ ifdef ICON
        @echo $(DL)10 ICON DISCARDABLE "$(ICON)"$(DL) >> $@
 endif
 
        @echo $(DL)10 ICON DISCARDABLE "$(ICON)"$(DL) >> $@
 endif
 
-$(PROOT)/rrd_config.h: Makefile $(OBJDIR)/version.inc
+$(PROOT)/rrd_config.h: FORCE Makefile $(OBJDIR)/version.inc
        @echo Creating $@
        @echo $(DL)/* $(notdir $@) for Win32 target.$(DL) > $@
        @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@
        @echo Creating $@
        @echo $(DL)/* $(notdir $@) for Win32 target.$(DL) > $@
        @echo $(DL)** Do not edit this file - it is created by make!$(DL) >> $@