Mercurial > vim
annotate src/GvimExt/Make_cyg.mak @ 5336:c514693882b9 v7.4.021
updated for version 7.4.021
Problem: NFA regexp: Using \ze in one branch which doesn't match may cause
end of another branch to be wrong. (William Fugh)
Solution: Set end position if it wasn't set yet.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Thu, 05 Sep 2013 21:15:44 +0200 |
parents | 1b26748fc911 |
children | 0978e99043d2 |
rev | line source |
---|---|
3118
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
1 # Project: gvimext |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
2 # Generates gvimext.dll with gcc. |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
3 # To be used with Cygwin. |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
4 # |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
5 # Originally, the DLL base address was fixed: -Wl,--image-base=0x1C000000 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
6 # Now it is allocated dymanically by the linker by evaluating all DLLs |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
7 # already loaded in memory. The binary image contains as well information |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
8 # for automatic pseudo-rebasing, if needed by the system. ALV 2004-02-29 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
9 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
10 # If cross-compiling set this to yes, else set it to no |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
11 CROSS = no |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
12 #CROSS = yes |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
13 # For the old MinGW 2.95 (the one you get e.g. with debian woody) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
14 # set the following variable to yes and check if the executables are |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
15 # really named that way. |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
16 # If you have a newer MinGW or you are using cygwin set it to no and |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
17 # check also the executables |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
18 MINGWOLD = no |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
19 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
20 # Link against the shared versions of libgcc/libstdc++ by default. Set |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
21 # STATIC_STDCPLUS to "yes" to link against static versions instead. |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
22 STATIC_STDCPLUS=no |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
23 #STATIC_STDCPLUS=yes |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
24 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
25 # Note: -static-libstdc++ is not available until gcc 4.5.x. |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
26 LDFLAGS += -shared |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
27 ifeq (yes, $(STATIC_STDCPLUS)) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
28 LDFLAGS += -static-libgcc -static-libstdc++ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
29 endif |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
30 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
31 ifeq ($(CROSS),yes) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
32 DEL = rm |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
33 ifeq ($(MINGWOLD),yes) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
34 CXXFLAGS := -O2 -mno-cygwin -fvtable-thunks |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
35 else |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
36 CXXFLAGS := -O2 -mno-cygwin |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
37 endif |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
38 else |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
39 CXXFLAGS := -O2 -mno-cygwin |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
40 ifneq (sh.exe, $(SHELL)) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
41 DEL = rm |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
42 else |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
43 DEL = del |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
44 endif |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
45 endif |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
46 CXX := $(CROSS_COMPILE)g++ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
47 WINDRES := $(CROSS_COMPILE)windres |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
48 WINDRES_CXX = $(CXX) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
49 WINDRES_FLAGS = --preprocessor="$(WINDRES_CXX) -E -xc" -DRC_INVOKED |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
50 LIBS := -luuid |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
51 RES := gvimext.res |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
52 DEFFILE = gvimext_ming.def |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
53 OBJ := gvimext.o |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
54 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
55 DLL := gvimext.dll |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
56 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
57 .PHONY: all all-before all-after clean clean-custom |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
58 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
59 all: all-before $(DLL) all-after |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
60 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
61 $(DLL): $(OBJ) $(RES) $(DEFFILE) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
62 $(CXX) $(LDFLAGS) $(CXXFLAGS) -s -o $@ \ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
63 -Wl,--enable-auto-image-base \ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
64 -Wl,--enable-auto-import \ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
65 -Wl,--whole-archive \ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
66 $^ \ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
67 -Wl,--no-whole-archive \ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
68 $(LIBS) |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
69 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
70 gvimext.o: gvimext.cpp |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
71 $(CXX) $(CXXFLAGS) -DFEAT_GETTEXT -c $? -o $@ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
72 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
73 $(RES): gvimext_ming.rc |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
74 $(WINDRES) $(WINDRES_FLAGS) --input-format=rc --output-format=coff -DMING $? -o $@ |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
75 |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
76 clean: clean-custom |
1b26748fc911
Add files aaded by patch 7.3.326.
Bram Moolenaar <bram@vim.org>
parents:
diff
changeset
|
77 -$(DEL) $(OBJ) $(RES) $(DLL) |