comparison src/GvimExt/Make_ming.mak @ 2674:f921368d43c3 v7.3.093

updated for version 7.3.093 Problem: New DLL dependencies in MingW with gcc 4.5.0. Solution: Add STATIC_STDCPLUS, LDFLAGS and split up WINDRES. (Guopeng Wen)
author Bram Moolenaar <bram@vim.org>
date Thu, 30 Dec 2010 14:50:52 +0100
parents 56b638f2029e
children d3758064ff99
comparison
equal deleted inserted replaced
2673:5a1fe35a6eaf 2674:f921368d43c3
15 # really named that way. 15 # really named that way.
16 # If you have a newer MinGW or you are using cygwin set it to no and 16 # If you have a newer MinGW or you are using cygwin set it to no and
17 # check also the executables 17 # check also the executables
18 MINGWOLD = no 18 MINGWOLD = no
19 19
20 # Link against the shared versions of libgcc/libstdc++ by default. Set
21 # STATIC_STDCPLUS to "yes" to link against static versions instead.
22 STATIC_STDCPLUS=no
23 #STATIC_STDCPLUS=yes
24
25 # Note: -static-libstdc++ is not available until gcc 4.5.x.
26 LDFLAGS += -shared
27 ifeq (yes, $(STATIC_STDCPLUS))
28 LDFLAGS += -static-libgcc -static-libstdc++
29 endif
30
20 ifeq ($(CROSS),yes) 31 ifeq ($(CROSS),yes)
21 DEL = rm 32 DEL = rm
22 ifeq ($(MINGWOLD),yes) 33 ifeq ($(MINGWOLD),yes)
23 CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks 34 CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks
24 else 35 else
31 else 42 else
32 DEL = del 43 DEL = del
33 endif 44 endif
34 endif 45 endif
35 CXX := $(CROSS_COMPILE)g++ 46 CXX := $(CROSS_COMPILE)g++
36 WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CXX) -E -xc" -DRC_INVOKED 47 WINDRES := $(CROSS_COMPILE)windres
48 WINDRES_CXX = $(CXX)
49 WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED
37 LIBS := -luuid 50 LIBS := -luuid
38 RES := gvimext.res 51 RES := gvimext.res
39 DEFFILE = gvimext_ming.def 52 DEFFILE = gvimext_ming.def
40 OBJ := gvimext.o 53 OBJ := gvimext.o
41 54
44 .PHONY: all all-before all-after clean clean-custom 57 .PHONY: all all-before all-after clean clean-custom
45 58
46 all: all-before $(DLL) all-after 59 all: all-before $(DLL) all-after
47 60
48 $(DLL): $(OBJ) $(RES) $(DEFFILE) 61 $(DLL): $(OBJ) $(RES) $(DEFFILE)
49 $(CXX) -shared $(CXXFLAGS) -s -o $@ \ 62 $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \
50 -Wl,--enable-auto-image-base \ 63 -Wl,--enable-auto-image-base \
51 -Wl,--enable-auto-import \ 64 -Wl,--enable-auto-import \
52 -Wl,--whole-archive \ 65 -Wl,--whole-archive \
53 $^ \ 66 $^ \
54 -Wl,--no-whole-archive \ 67 -Wl,--no-whole-archive \
56 69
57 gvimext.o: gvimext.cpp 70 gvimext.o: gvimext.cpp
58 $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ 71 $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@
59 72
60 $(RES): gvimext_ming.rc 73 $(RES): gvimext_ming.rc
61 $(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@ 74 $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@
62 75
63 clean: clean-custom 76 clean: clean-custom
64 -$(DEL) $(OBJ) $(RES) $(DLL) 77 -$(DEL) $(OBJ) $(RES) $(DLL)
65 78