diff options
author | Bram Moolenaar <Bram@vim.org> | 2004-06-24 15:53:16 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2004-06-24 15:53:16 +0000 |
commit | f4b8e57ffd048f9ca46dd7618939ba7a1b2294ec (patch) | |
tree | 08865b59e356d861c0d1321e4adaef8385e53635 /src/GvimExt/Make_ming.mak | |
parent | 69a7cb473ceae109b61fae9aa04ee0c29afba5d9 (diff) | |
download | vim-git-f4b8e57ffd048f9ca46dd7618939ba7a1b2294ec.tar.gz |
updated for version 7.0002
Diffstat (limited to 'src/GvimExt/Make_ming.mak')
-rw-r--r-- | src/GvimExt/Make_ming.mak | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/GvimExt/Make_ming.mak b/src/GvimExt/Make_ming.mak new file mode 100644 index 000000000..345625524 --- /dev/null +++ b/src/GvimExt/Make_ming.mak @@ -0,0 +1,63 @@ +# Project: gvimext +# Generates gvimext.dll with gcc. +# Can be used for Cygwin and MingW (MingW ignores -mno-cygwin) +# +# Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000 +# Now it is allocated dymanically by the linker by evaluating all DLLs +# already loaded in memory. The binary image contains as well information +# for automatic pseudo-rebasing, if needed by the system. ALV 2004-02-29 + +# If cross-compiling set this to yes, else set it to no +CROSS = no +#CROSS = yes +# For the old MinGW 2.95 (the one you get e.g. with debian woody) +# set the following variable to yes and check if the executables are +# really named that way. +# If you have a newer MinGW or you are using cygwin set it to no and +# check also the executables +MINGWOLD = no + +ifeq ($(CROSS),yes) +ifeq ($(MINGWOLD),yes) +CXX = i586-mingw32msvc-g++ +CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks +WINDRES = i586-mingw32msvc-windres +else +CXX = i386-mingw32msvc-g++ +CXXFLAGS := -O2 -mno-cygwin +WINDRES = i386-mingw32msvc-windres +endif +else +CXX := g++.exe +WINDRES := windres.exe +CXXFLAGS := -O2 -mno-cygwin +endif +LIBS := -luuid +RES := gvimext.res +DEFFILE = gvimext_ming.def +OBJ := gvimext.o + +DLL := gvimext.dll + +.PHONY: all all-before all-after clean clean-custom + +all: all-before $(DLL) all-after + +$(DLL): $(OBJ) $(RES) $(DEFFILE) + $(CXX) -shared $(CXXFLAGS) -s -o $@ \ + -Wl,--enable-auto-image-base \ + -Wl,--enable-auto-import \ + -Wl,--whole-archive \ + $^ \ + -Wl,--no-whole-archive \ + $(LIBS) + +gvimext.o: gvimext.cpp + $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ + +$(RES): gvimext_ming.rc + $(WINDRES) --input-format=rc --output-format=coff -DMING $? -o $@ + +clean: clean-custom + $(RM) $(OBJ) $(RES) $(DLL) + |