Applied Norman Vine's changes for Cygwin/Mingw
This commit is contained in:
parent
ec1fd733b8
commit
29cee0c15f
@ -77,6 +77,8 @@ OBJS = $(C++FILES:.cpp=.o) \
|
|||||||
$(CXXFILES:.cpp=.o) \
|
$(CXXFILES:.cpp=.o) \
|
||||||
$(CFILES:.c=.o) \
|
$(CFILES:.c=.o) \
|
||||||
|
|
||||||
|
EXE_EXT =
|
||||||
|
|
||||||
DOF = $(OPTF)
|
DOF = $(OPTF)
|
||||||
DEBUGDIR = $(OS)$(ARCH).Debug
|
DEBUGDIR = $(OS)$(ARCH).Debug
|
||||||
OPTDIR = $(OS)$(ARCH).Opt
|
OPTDIR = $(OS)$(ARCH).Opt
|
||||||
@ -430,7 +432,7 @@ ifeq ($(OS),Darwin)
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#### Cygwin/Mingw specific definitions
|
#### Cygwin specific definitions
|
||||||
ifeq ($(OS),CYGWIN)
|
ifeq ($(OS),CYGWIN)
|
||||||
C++ = c++
|
C++ = c++
|
||||||
DEPARG = -M
|
DEPARG = -M
|
||||||
@ -439,9 +441,10 @@ ifeq ($(OS),CYGWIN)
|
|||||||
OPTF = -O2
|
OPTF = -O2
|
||||||
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
||||||
SHARED = -shared\
|
SHARED = -shared\
|
||||||
-Wl,--export-all-symbols \
|
-Wl,--out-implib,$(TOPDIR)/lib/$(OS)/lib$(TARGET_BASENAME).dll.a
|
||||||
-Wl,--output-def,lib$(TARGET_BASENAME).def \
|
-Wl,--export-all-symbols
|
||||||
-Wl,--out-implib,$(TOPDIR)/lib/lib$(TARGET_BASENAME).dll.a
|
|
||||||
|
EXE_EXT =.exe
|
||||||
ARCH =
|
ARCH =
|
||||||
ARCHINST =
|
ARCHINST =
|
||||||
ARCHARGS =
|
ARCHARGS =
|
||||||
@ -458,6 +461,10 @@ ifeq ($(OS),CYGWIN)
|
|||||||
GIF_LIBS = -lungif
|
GIF_LIBS = -lungif
|
||||||
TIFF_LIB = -ltiff -lz -ljpeg
|
TIFF_LIB = -ltiff -lz -ljpeg
|
||||||
FREETYPE_LIB = -lfreetype
|
FREETYPE_LIB = -lfreetype
|
||||||
|
|
||||||
|
LIBINST = bin
|
||||||
|
PLUGININST = bin/$(OS)$(ARCH)
|
||||||
|
|
||||||
LIB_PREFIX = cyg
|
LIB_PREFIX = cyg
|
||||||
LIB_EXT = dll
|
LIB_EXT = dll
|
||||||
PLUGIN_EXT = dll
|
PLUGIN_EXT = dll
|
||||||
@ -475,7 +482,7 @@ ifeq ($(OS),CYGWIN)
|
|||||||
MAKEDIST = $(TOPDIR)/Make/makeinnosetup
|
MAKEDIST = $(TOPDIR)/Make/makeinnosetup
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#### Cygwin/Mingw specific definitions
|
#### Mingw specific definitions
|
||||||
ifeq ($(OS),MINGW)
|
ifeq ($(OS),MINGW)
|
||||||
C++ = c++ -mthreads
|
C++ = c++ -mthreads
|
||||||
DEPARG = -M
|
DEPARG = -M
|
||||||
@ -485,9 +492,10 @@ ifeq ($(OS),MINGW)
|
|||||||
OPTF = -O2
|
OPTF = -O2
|
||||||
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
DBGF = -g -DOSG_COMPILE_UNIT_TESTS
|
||||||
SHARED = -shared -mthreads \
|
SHARED = -shared -mthreads \
|
||||||
-Wl,--export-all-symbols \
|
-Wl,--out-implib,$(TOPDIR)/lib/$(OS)/lib$(TARGET_BASENAME).dll.a \
|
||||||
-Wl,--output-def,lib$(TARGET_BASENAME).def \
|
-Wl,--export-all-symbols
|
||||||
-Wl,--out-implib,$(TOPDIR)/lib/lib$(TARGET_BASENAME).dll.a
|
|
||||||
|
EXE_EXT =.exe
|
||||||
ARCH =
|
ARCH =
|
||||||
ARCHINST =
|
ARCHINST =
|
||||||
ARCHARGS =
|
ARCHARGS =
|
||||||
@ -507,18 +515,21 @@ ifeq ($(OS),MINGW)
|
|||||||
|
|
||||||
LIBXML2_INCLUDE = -I/usr/mingw/include/libxml2
|
LIBXML2_INCLUDE = -I/usr/mingw/include/libxml2
|
||||||
|
|
||||||
|
LIBINST = bin
|
||||||
|
PLUGININST = bin/$(OS)$(ARCH)
|
||||||
|
|
||||||
LIB_PREFIX = lib
|
LIB_PREFIX = lib
|
||||||
LIB_EXT = dll
|
LIB_EXT = dll
|
||||||
PLUGIN_EXT = dll
|
PLUGIN_EXT = dll
|
||||||
LINK = cp -f
|
LINK = cp -f
|
||||||
INST_LOCATION = /usr/local/OpenSceneGraph
|
INST_LOCATION = /usr/local/OpenSceneGraph
|
||||||
INST_LIBS = $(INST_LOCATION)/bin
|
INST_LIBS = $(INST_LOCATION)/bin
|
||||||
INST_PLUGINS = $(INST_LOCATION)/bin
|
INST_PLUGINS = $(INST_LOCATION)/bin
|
||||||
INST_INCLUDE = $(INST_LOCATION)/include
|
INST_INCLUDE = $(INST_LOCATION)/include
|
||||||
INST_SHARE_PREFIX = /usr/local/OpenSceneGraph
|
INST_SHARE_PREFIX = /usr/local/OpenSceneGraph
|
||||||
INST_SRC = $(INST_SHARE_PREFIX)/src
|
INST_SRC = $(INST_SHARE_PREFIX)/src
|
||||||
INST_EXAMPLES = $(INST_SHARE_PREFIX)/bin
|
INST_EXAMPLES = $(INST_SHARE_PREFIX)/bin
|
||||||
INST_EXAMPLE_SRC = $(INST_SHARE_PREFIX)/src/examples
|
INST_EXAMPLE_SRC = $(INST_SHARE_PREFIX)/src/examples
|
||||||
INST_DOC = $(INST_SHARE_PREFIX)/doc
|
INST_DOC = $(INST_SHARE_PREFIX)/doc
|
||||||
INST_DATA = $(INST_SHARE_PREFIX)/data
|
INST_DATA = $(INST_SHARE_PREFIX)/data
|
||||||
endif
|
endif
|
||||||
|
@ -89,7 +89,7 @@ $(EXEC:=.dbg) :
|
|||||||
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
|
$(MAKE) -f ../GNUmakefile "DOF=$(DBGF)" TOPDIR=../${TOPDIR} \
|
||||||
THISDIR=../$(THISDIR)\
|
THISDIR=../$(THISDIR)\
|
||||||
MAKEDEPEND=Makedepend $(EXEC)
|
MAKEDEPEND=Makedepend $(EXEC)
|
||||||
@$(MAKE) LNSRC=$(DEBUGDIR)/$(EXEC) LNDEST=$(BININST)/$(OS)$(ARCH)/$(EXEC) __link
|
@$(MAKE) LNSRC=$(DEBUGDIR)/$(EXEC)$(EXE_EXT) LNDEST=$(BININST)/$(OS)$(ARCH)/$(EXEC)$(EXE_EXT) __link
|
||||||
|
|
||||||
$(LIB:=.dbg) : $(PLUGIN:=.dbg)
|
$(LIB:=.dbg) : $(PLUGIN:=.dbg)
|
||||||
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
|
@[ -d $(DEBUGDIR) ] || mkdir $(DEBUGDIR)
|
||||||
@ -113,7 +113,7 @@ $(EXEC:=.opt) :
|
|||||||
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
|
$(MAKE) -f ../GNUmakefile DOF=$(OPTF) TOPDIR=../${TOPDIR} \
|
||||||
THISDIR=../$(THISDIR)\
|
THISDIR=../$(THISDIR)\
|
||||||
MAKEDEPEND=Makedepend $(EXEC)
|
MAKEDEPEND=Makedepend $(EXEC)
|
||||||
@$(MAKE) LNSRC=$(OPTDIR)/$(EXEC) LNDEST=$(BININST)/$(OS)$(ARCH)/$(EXEC) __link
|
@$(MAKE) LNSRC=$(OPTDIR)/$(EXEC)$(EXE_EXT) LNDEST=$(BININST)/$(OS)$(ARCH)/$(EXEC)$(EXE_EXT) __link
|
||||||
|
|
||||||
|
|
||||||
$(LIB:=.opt) :
|
$(LIB:=.opt) :
|
||||||
|
Loading…
Reference in New Issue
Block a user