comparison src/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 5c4b2fc4f067
children 4e21fd3cfc30
comparison
equal deleted inserted replaced
2673:5a1fe35a6eaf 2674:f921368d43c3
54 CSCOPE=yes 54 CSCOPE=yes
55 # Set to yes to enable Netbeans support 55 # Set to yes to enable Netbeans support
56 NETBEANS=$(GUI) 56 NETBEANS=$(GUI)
57 57
58 58
59 # Link against the shared version of libstdc++ by default. Set
60 # STATIC_STDCPLUS to "yes" to link against static version instead.
61 ifndef STATIC_STDCPLUS
62 STATIC_STDCPLUS=no
63 endif
64
59 # If the user doesn't want gettext, undefine it. 65 # If the user doesn't want gettext, undefine it.
60 ifeq (no, $(GETTEXT)) 66 ifeq (no, $(GETTEXT))
61 GETTEXT= 67 GETTEXT=
62 endif 68 endif
63 # Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23 69 # Added by E.F. Amatria <eferna1@platea.ptic.mec.es> 2001 Feb 23
307 MKDIR = mkdir 313 MKDIR = mkdir
308 DIRSLASH = \\ 314 DIRSLASH = \\
309 endif 315 endif
310 endif 316 endif
311 CC := $(CROSS_COMPILE)gcc 317 CC := $(CROSS_COMPILE)gcc
312 WINDRES := $(CROSS_COMPILE)windres --preprocessor="$(CC) -E -xc" -DRC_INVOKED 318 WINDRES := $(CROSS_COMPILE)windres
319 WINDRES_CC = $(CC)
313 320
314 #>>>>> end of choices 321 #>>>>> end of choices
315 ########################################################################### 322 ###########################################################################
316 323
317 CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall 324 CFLAGS = -Iproto $(DEFINES) -pipe -w -march=$(ARCH) -Wall
325 WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
318 326
319 ifdef GETTEXT 327 ifdef GETTEXT
320 DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H 328 DEFINES += -DHAVE_GETTEXT -DHAVE_LOCALE_H
321 GETTEXTINCLUDE = $(GETTEXT)/include 329 GETTEXTINCLUDE = $(GETTEXT)/include
322 GETTEXTLIB = $(INTLPATH) 330 GETTEXTLIB = $(INTLPATH)
575 LIB += -ltcl$(TCL_VER) 583 LIB += -ltcl$(TCL_VER)
576 endif 584 endif
577 endif 585 endif
578 586
579 ifeq (yes, $(OLE)) 587 ifeq (yes, $(OLE))
580 LIB += -loleaut32 -lstdc++ 588 LIB += -loleaut32
581 OBJ += $(OUTDIR)/if_ole.o 589 OBJ += $(OUTDIR)/if_ole.o
590 ifeq (yes, $(STATIC_STDCPLUS))
591 LIB += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
592 else
593 LIB += -lstdc++
594 endif
582 endif 595 endif
583 596
584 ifeq (yes, $(MBYTE)) 597 ifeq (yes, $(MBYTE))
585 DEFINES += -DFEAT_MBYTE 598 DEFINES += -DFEAT_MBYTE
586 endif 599 endif
654 667
655 $(OUTDIR)/%.o : %.c $(INCL) 668 $(OUTDIR)/%.o : %.c $(INCL)
656 $(CC) -c $(CFLAGS) $< -o $@ 669 $(CC) -c $(CFLAGS) $< -o $@
657 670
658 $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h 671 $(OUTDIR)/vimres.res: vim.rc version.h gui_w32_rc.h
659 $(WINDRES) $(DEFINES) vim.rc $(OUTDIR)/vimres.res 672 $(WINDRES) $(WINDRES_FLAGS) $(DEFINES) vim.rc $(OUTDIR)/vimres.res
660 673
661 $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res 674 $(OUTDIR)/vimrc.o: $(OUTDIR)/vimres.res
662 $(WINDRES) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o 675 $(WINDRES) $(WINDRES_FLAGS) $(OUTDIR)/vimres.res $(OUTDIR)/vimrc.o
663 676
664 $(OUTDIR): 677 $(OUTDIR):
665 $(MKDIR) $(OUTDIR) 678 $(MKDIR) $(OUTDIR)
666 679
667 $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h 680 $(OUTDIR)/ex_docmd.o: ex_docmd.c $(INCL) ex_cmds.h