From 1a51045ea4393ed745cd1381a0e3481e94a0f816 Mon Sep 17 00:00:00 2001 From: Don BURNS Date: Sun, 7 Apr 2002 17:47:03 +0000 Subject: [PATCH] Added a stop gap fix for cygwin build. Previous experiements were creating library and plugin files that looked like system library and system files which would have deleted original files on a 'make install'. Cygwin is not tested yet, but this needed to get fixed before a cygwin user wiped out his system library files. --- Make/cygwin_plugin_def | 10 ++++++++++ Make/makedefs | 2 -- src/osgPlugins/bmp/Makefile | 2 ++ src/osgPlugins/dw/Makefile | 1 + src/osgPlugins/dx/Makefile | 1 + src/osgPlugins/flt/Makefile | 1 + src/osgPlugins/gif/Makefile | 1 + src/osgPlugins/jpeg/Makefile | 1 + src/osgPlugins/lib3ds/Makefile | 1 + src/osgPlugins/lwo/Makefile | 1 + src/osgPlugins/obj/Makefile | 1 + src/osgPlugins/osg/Makefile | 1 + src/osgPlugins/osgtgz/Makefile | 1 + src/osgPlugins/pfb/Makefile | 1 + src/osgPlugins/pic/Makefile | 1 + src/osgPlugins/png/Makefile | 1 + src/osgPlugins/quicktime/Makefile | 1 + src/osgPlugins/rgb/Makefile | 1 + src/osgPlugins/tga/Makefile | 1 + src/osgPlugins/tgz/Makefile | 1 + src/osgPlugins/tiff/Makefile | 1 + src/osgPlugins/txp/Makefile | 1 + src/osgPlugins/zip/Makefile | 1 + 23 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 Make/cygwin_plugin_def diff --git a/Make/cygwin_plugin_def b/Make/cygwin_plugin_def new file mode 100644 index 000000000..a7a806c4d --- /dev/null +++ b/Make/cygwin_plugin_def @@ -0,0 +1,10 @@ + +# +# blessed are those who try to make Windows behave like it should ... +# + +ifeq ($(OS),CYGWIN) +TARGET_BASENAME := $(PLUGIN_PREFIX)$(TARGET_BASENAME) +PLUGIN_PREFIX := cyg +endif + diff --git a/Make/makedefs b/Make/makedefs index 3459d8957..9491f9f08 100644 --- a/Make/makedefs +++ b/Make/makedefs @@ -12,7 +12,6 @@ ifeq ($(findstring CYGWIN,$(OS)),CYGWIN) OS := CYGWIN endif - # TOPDIR needs to be redefined for every Makefile TOPDIR ?= ../ THISDIR = . @@ -262,7 +261,6 @@ ifeq ($(OS),CYGWIN) LIB_PREFIX = cyg LIB_EXT = dll - PLUGIN_PREFIX = cygosgdb_ PLUGIN_EXT = dll LINK = cp -f diff --git a/src/osgPlugins/bmp/Makefile b/src/osgPlugins/bmp/Makefile index 8aa56ca49..d0b8c0a1c 100644 --- a/src/osgPlugins/bmp/Makefile +++ b/src/osgPlugins/bmp/Makefile @@ -7,6 +7,8 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = bmp +include $(TOPDIR)/Make/cygwin_plugin_def +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/dw/Makefile b/src/osgPlugins/dw/Makefile index ba7d30e2a..48eda0c74 100644 --- a/src/osgPlugins/dw/Makefile +++ b/src/osgPlugins/dw/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = dw +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/dx/Makefile b/src/osgPlugins/dx/Makefile index 0b1c91fab..6307d1f72 100644 --- a/src/osgPlugins/dx/Makefile +++ b/src/osgPlugins/dx/Makefile @@ -10,6 +10,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = dx +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/flt/Makefile b/src/osgPlugins/flt/Makefile index 8c9dffa45..c3f134e78 100644 --- a/src/osgPlugins/flt/Makefile +++ b/src/osgPlugins/flt/Makefile @@ -48,6 +48,7 @@ INC += -I$(THISDIR) LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = flt +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/gif/Makefile b/src/osgPlugins/gif/Makefile index 24d34ea41..fbefc190f 100644 --- a/src/osgPlugins/gif/Makefile +++ b/src/osgPlugins/gif/Makefile @@ -13,6 +13,7 @@ LINKARGS += -L/usr/freeware/lib$(ARCH) LIBS += $(OSG_LIBS) $(GIF_LIBS) $(OTHER_LIBS) TARGET_BASENAME = gif +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/jpeg/Makefile b/src/osgPlugins/jpeg/Makefile index 691b2e6a2..29868bc77 100644 --- a/src/osgPlugins/jpeg/Makefile +++ b/src/osgPlugins/jpeg/Makefile @@ -9,6 +9,7 @@ INC += -I/usr/local/include/ LIBS += $(OSG_LIBS) $(JPEG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = jpeg +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/lib3ds/Makefile b/src/osgPlugins/lib3ds/Makefile index 79df47ff5..45a3bdf0c 100644 --- a/src/osgPlugins/lib3ds/Makefile +++ b/src/osgPlugins/lib3ds/Makefile @@ -29,6 +29,7 @@ INC += -I$(THISDIR) LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = 3ds +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/lwo/Makefile b/src/osgPlugins/lwo/Makefile index b881a5c2e..3a801dc53 100644 --- a/src/osgPlugins/lwo/Makefile +++ b/src/osgPlugins/lwo/Makefile @@ -11,6 +11,7 @@ INC += -I$(THISDIR) LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = lwo +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/obj/Makefile b/src/osgPlugins/obj/Makefile index 962bd5958..23d5d9d07 100644 --- a/src/osgPlugins/obj/Makefile +++ b/src/osgPlugins/obj/Makefile @@ -11,6 +11,7 @@ INC += -I$(THISDIR) LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = obj +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/osg/Makefile b/src/osgPlugins/osg/Makefile index db1d9e8d3..3fe88a285 100644 --- a/src/osgPlugins/osg/Makefile +++ b/src/osgPlugins/osg/Makefile @@ -46,6 +46,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = osg +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/osgtgz/Makefile b/src/osgPlugins/osgtgz/Makefile index 6a0474d55..a53fda49a 100644 --- a/src/osgPlugins/osgtgz/Makefile +++ b/src/osgPlugins/osgtgz/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = osgtgz +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/pfb/Makefile b/src/osgPlugins/pfb/Makefile index 95a47fb8e..2ae8fe44c 100644 --- a/src/osgPlugins/pfb/Makefile +++ b/src/osgPlugins/pfb/Makefile @@ -9,6 +9,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = pfb +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/pic/Makefile b/src/osgPlugins/pic/Makefile index 0523ed0b3..20f8d7f1f 100644 --- a/src/osgPlugins/pic/Makefile +++ b/src/osgPlugins/pic/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = pic +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/png/Makefile b/src/osgPlugins/png/Makefile index efa7b6284..6ab1224e7 100644 --- a/src/osgPlugins/png/Makefile +++ b/src/osgPlugins/png/Makefile @@ -11,6 +11,7 @@ INC += -I/usr/local/include\ LINKARGS += -L/usr/freeware/lib$(ARCH) TARGET_BASENAME = png +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/quicktime/Makefile b/src/osgPlugins/quicktime/Makefile index bdacfb40c..f3e845499 100644 --- a/src/osgPlugins/quicktime/Makefile +++ b/src/osgPlugins/quicktime/Makefile @@ -8,6 +8,7 @@ CXXFILES =\ LIBS += $(QUICKTIME) $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = qt +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/rgb/Makefile b/src/osgPlugins/rgb/Makefile index 59134d9ad..d7a0639f0 100644 --- a/src/osgPlugins/rgb/Makefile +++ b/src/osgPlugins/rgb/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = rgb +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/tga/Makefile b/src/osgPlugins/tga/Makefile index c4eeb0ff6..97a16a290 100644 --- a/src/osgPlugins/tga/Makefile +++ b/src/osgPlugins/tga/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = tga +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/tgz/Makefile b/src/osgPlugins/tgz/Makefile index 6c3510342..743e91880 100644 --- a/src/osgPlugins/tgz/Makefile +++ b/src/osgPlugins/tgz/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = tgz +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/tiff/Makefile b/src/osgPlugins/tiff/Makefile index a7db8deb7..38421e6f6 100644 --- a/src/osgPlugins/tiff/Makefile +++ b/src/osgPlugins/tiff/Makefile @@ -10,6 +10,7 @@ INC += -I/usr/local/include LDFLAGS += -L/usr/local/lib TARGET_BASENAME = tiff +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/txp/Makefile b/src/osgPlugins/txp/Makefile index 3743e9d07..d60c3b7e3 100644 --- a/src/osgPlugins/txp/Makefile +++ b/src/osgPlugins/txp/Makefile @@ -31,6 +31,7 @@ INC += -I$(THISDIR) LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = txp +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules diff --git a/src/osgPlugins/zip/Makefile b/src/osgPlugins/zip/Makefile index 77bfc5859..462b0c8c0 100644 --- a/src/osgPlugins/zip/Makefile +++ b/src/osgPlugins/zip/Makefile @@ -7,6 +7,7 @@ CXXFILES =\ LIBS += $(OSG_LIBS) $(OTHER_LIBS) TARGET_BASENAME = zip +include $(TOPDIR)/Make/cygwin_plugin_def PLUGIN = $(PLUGIN_PREFIX)$(TARGET_BASENAME).$(PLUGIN_EXT) include $(TOPDIR)/Make/makerules