comparison src/Make_cyg.mak @ 2329:ad2889f48843 vim73

Added support for Python 3. (Roland Puntaier)
author Bram Moolenaar <bram@vim.org>
date Sat, 17 Jul 2010 21:19:38 +0200
parents 966a5609669e
children 5c4b2fc4f067
comparison
equal deleted inserted replaced
2328:15379284e55a 2329:ad2889f48843
12 # PERL_VER define to version of Perl being used (56) 12 # PERL_VER define to version of Perl being used (56)
13 # DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (yes) 13 # DYNAMIC_PERL no or yes: set to yes to load the Perl DLL dynamically (yes)
14 # PYTHON define to path to Python dir to get PYTHON support (not defined) 14 # PYTHON define to path to Python dir to get PYTHON support (not defined)
15 # PYTHON_VER define to version of Python being used (22) 15 # PYTHON_VER define to version of Python being used (22)
16 # DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (yes) 16 # DYNAMIC_PYTHON no or yes: use yes to load the Python DLL dynamically (yes)
17 # PYTHON3 define to path to Python3 dir to get PYTHON3 support (not defined)
18 # PYTHON3_VER define to version of Python3 being used (22)
19 # DYNAMIC_PYTHON3 no or yes: use yes to load the Python3 DLL dynamically (yes)
17 # TCL define to path to TCL dir to get TCL support (not defined) 20 # TCL define to path to TCL dir to get TCL support (not defined)
18 # TCL_VER define to version of TCL being used (83) 21 # TCL_VER define to version of TCL being used (83)
19 # DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (yes) 22 # DYNAMIC_TCL no or yes: use yes to load the TCL DLL dynamically (yes)
20 # RUBY define to path to Ruby dir to get Ruby support (not defined) 23 # RUBY define to path to Ruby dir to get Ruby support (not defined)
21 # RUBY_VER define to version of Ruby being used (16) 24 # RUBY_VER define to version of Ruby being used (16)
137 # DYNAMIC_PYTHON=yes works. 140 # DYNAMIC_PYTHON=yes works.
138 # DYNAMIC_PYTHON=no does not (unresolved externals on link). 141 # DYNAMIC_PYTHON=no does not (unresolved externals on link).
139 ############################## 142 ##############################
140 ifdef PYTHON 143 ifdef PYTHON
141 DEFINES += -DFEAT_PYTHON 144 DEFINES += -DFEAT_PYTHON
142 INCLUDES += -I$(PYTHON)/include
143 EXTRA_OBJS += $(OUTDIR)/if_python.o 145 EXTRA_OBJS += $(OUTDIR)/if_python.o
144 146
145 ifndef DYNAMIC_PYTHON 147 ifndef DYNAMIC_PYTHON
146 DYNAMIC_PYTHON = yes 148 DYNAMIC_PYTHON = yes
147 endif 149 endif
152 154
153 ifeq (yes, $(DYNAMIC_PYTHON)) 155 ifeq (yes, $(DYNAMIC_PYTHON))
154 DEFINES += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\" 156 DEFINES += -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL=\"python$(PYTHON_VER).dll\"
155 else 157 else
156 EXTRA_LIBS += $(PYTHON)/libs/python$(PYTHON_VER).lib 158 EXTRA_LIBS += $(PYTHON)/libs/python$(PYTHON_VER).lib
159 endif
160 endif
161
162 ##############################
163 # DYNAMIC_PYTHON3=yes works.
164 # DYNAMIC_PYTHON3=no does not (unresolved externals on link).
165 ##############################
166 ifdef PYTHON3
167 DEFINES += -DFEAT_PYTHON3
168 EXTRA_OBJS += $(OUTDIR)/if_python3.o
169
170 ifndef DYNAMIC_PYTHON3
171 DYNAMIC_PYTHON3 = yes
172 endif
173
174 ifndef PYTHON3_VER
175 PYTHON3_VER = 31
176 endif
177
178 ifeq (yes, $(DYNAMIC_PYTHON3))
179 DEFINES += -DDYNAMIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL=\"python$(PYTHON3_VER).dll\"
180 else
181 EXTRA_LIBS += $(PYTHON3)/libs/python$(PYTHON3_VER).lib
157 endif 182 endif
158 endif 183 endif
159 184
160 ############################## 185 ##############################
161 # DYNAMIC_RUBY=yes works. 186 # DYNAMIC_RUBY=yes works.
561 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o 586 $(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
562 587
563 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL) 588 $(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
564 $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o 589 $(CC) -c $(CFLAGS) if_ole.cpp -o $(OUTDIR)/if_ole.o
565 590
591 $(OUTDIR)/if_python.o : if_python.c $(INCL)
592 $(CC) -c $(CFLAGS) -I$(PYTHON)/include $< -o $@
593
594 $(OUTDIR)/if_python3.o : if_python3.c $(INCL)
595 $(CC) -c $(CFLAGS) -I$(PYTHON3)/include $< -o $@
596
566 if_perl.c: if_perl.xs typemap 597 if_perl.c: if_perl.xs typemap
567 $(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \ 598 $(PERL)/bin/perl `cygpath -d $(PERL)/lib/ExtUtils/xsubpp` \
568 -prototypes -typemap \ 599 -prototypes -typemap \
569 `cygpath -d $(PERL)/lib/ExtUtils/typemap` if_perl.xs > $@ 600 `cygpath -d $(PERL)/lib/ExtUtils/typemap` if_perl.xs > $@
570 601
610 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c 641 @echo char_u *all_cflags = (char_u *)"$(CC) $(CFLAGS)"; >> pathdef.c
611 @echo char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)"; >> pathdef.c 642 @echo char_u *all_lflags = (char_u *)"$(CC) -s -o $(EXE) $(LIBS) -luuid -lole32 $(EXTRA_LIBS)"; >> pathdef.c
612 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c 643 @echo char_u *compiled_user = (char_u *)"$(USERNAME)"; >> pathdef.c
613 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c 644 @echo char_u *compiled_sys = (char_u *)"$(USERDOMAIN)"; >> pathdef.c
614 endif 645 endif
646