2727MODE = optimize
2828# MODE= debug
2929# === Assert() enabled ===
30- # ASSERTIONS=no
31- ASSERTIONS =yes
30+ ASSERTIONS =no
31+ # ASSERTIONS=yes
32+ # === Hard-wire installation location ===
33+ FIXED_PYHOME =no
34+ # FIXED_PYHOME=yes
3235
3336# === Optional modules ===
3437# Do you have the InfoZip compression library installed?
35- ZLIB = no
38+ HAVE_ZLIB = no
3639# Do you have the Ultra Fast Crypt (UFC) library installed?
37- UFC = no
40+ HAVE_UFC = no
3841# Do you have the Tcl/Tk library installed?
39- TCLTK = no
42+ HAVE_TCLTK = no
4043# Do you have the GNU multiprecision library installed?
41- GMPZ = no
44+ HAVE_GMPZ = no
4245# Do you have the GNU readline library installed?
4346# NOTE: I'm using a modified version of Kai Uwe Rommel's port that
4447# - is compiled with multithreading enabled
4548# - is linked statically
46- # I have had no success trying to use a DLL version, even with
47- # the multithreading switch .
48- GREADLINE = no
49+ # I have had no success trying to use a DLL version, even when
50+ # compiled with multithreading enabled .
51+ HAVE_GREADLINE = no
4952# Do you have the BSD DB library (v1.85) as included in the EMXBSD package?
5053# NOTE: this library needs to be recompiled with a structure member
5154# renamed to avoid problems with the multithreaded errno support
5255# (there is a structure member called errno, used for shadowing the
5356# real errno, which conflicts with the errno redefinition of -Zmt)
54- BSDDB = no
57+ HAVE_BSDDB = no
5558# Do you have the ncurses library installed? EMX's BSD curses aren't enough!
56- CURSES = no
59+ HAVE_NCURSES = no
5760# Do you have the GDBM library installed?
58- GDBM = no
61+ HAVE_GDBM = no
5962# Do you have the BZ2 compression library installed?
60- BZ2 = no
63+ HAVE_BZ2 = no
64+
65+ # === install locations ===
66+ # default value of PYTHONHOME
67+ LIB_DIR =C:/Python23
68+ # default is to have everything in or under PYTHONHOME
69+ EXE_DIR =$(LIB_DIR )
70+ DLL_DIR =$(EXE_DIR )
71+
6172
6273# === The Tools ===
6374CC = gcc
8596ifeq ($(ASSERTIONS ) ,no)
8697 CFLAGS+ = -DNDEBUG
8798endif
99+ ifeq ($(FIXED_PYHOME ) ,yes)
100+ CFLAGS+ = -DPREFIX=$(DQUOTE )$(LIB_DIR )$(DQUOTE )
101+ endif
88102
89103# We're using the OMF format since EMX's ld has a obscure bug
90104# because of which it sometimes fails to build relocations
@@ -250,7 +264,7 @@ SRC.MODULES= $(addprefix $(TOP), \
250264 Modules/gcmodule.c \
251265 Modules/signalmodule.c \
252266 Modules/posixmodule.c \
253- Modules/threadmodule.c)
267+ Modules/threadmodule.c
254268SRC.PARSE1= $(addprefix $(TOP ) , \
255269 Parser/acceler.c \
256270 Parser/grammar1.c \
@@ -391,6 +405,7 @@ EASYEXTMODULES= array \
391405HARDEXTMODULES = binascii \
392406 cPickle \
393407 cStringI \
408+ _csv \
394409 _hotshot \
395410 imageop \
396411 itertool \
@@ -410,33 +425,33 @@ HARDEXTMODULES= binascii \
410425 zipimpor
411426
412427# Python external ($(MODULE.EXT)) modules - can be EASY or HARD
413- ifeq ($(ZLIB ) ,yes)
428+ ifeq ($(HAVE_ZLIB ) ,yes)
414429 HARDEXTMODULES+ = zlib
415430endif
416- ifeq ($(UFC ) ,yes)
431+ ifeq ($(HAVE_UFC ) ,yes)
417432 HARDEXTMODULES+ = crypt
418433endif
419- ifeq ($(TCLTK ) ,yes)
434+ ifeq ($(HAVE_TCLTK ) ,yes)
420435 HARDEXTMODULES+ = _tkinter
421436 CFLAGS+ = -DHAS_DIRENT -I/TclTk80/include
422437 TK_LIBS+ = -L/TclTk80/lib -ltcl80 -ltk80
423438endif
424- ifeq ($(GMPZ ) ,yes)
439+ ifeq ($(HAVE_GMPZ ) ,yes)
425440 HARDEXTMODULES+ = mpz
426441endif
427- ifeq ($(GREADLINE ) ,yes)
442+ ifeq ($(HAVE_GREADLINE ) ,yes)
428443 HARDEXTMODULES+ = readline
429444endif
430- ifeq ($(BSDDB ) ,yes)
445+ ifeq ($(HAVE_BSDDB ) ,yes)
431446 HARDEXTMODULES+ = bsddb185
432447endif
433- ifeq ($(CURSES ) ,yes)
448+ ifeq ($(HAVE_NCURSES ) ,yes)
434449 HARDEXTMODULES+ = _curses _curses_
435450endif
436- ifeq ($(GDBM ) ,yes)
451+ ifeq ($(HAVE_GDBM ) ,yes)
437452 HARDEXTMODULES+ = gdbm dbm
438453endif
439- ifeq ($(BZ2 ) ,yes)
454+ ifeq ($(HAVE_BZ2 ) ,yes)
440455 HARDEXTMODULES+ = bz2
441456endif
442457
@@ -526,6 +541,9 @@ cStringIO$(MODULE.EXT): $(OUT)cStringIO$O $(OUT)cStringIO_m.def $(PYTHON.IMPLIB)
526541cStringI$(MODULE.EXT ) : cStringIO$(MODULE.EXT )
527542 cp $^ $@
528543
544+ _csv$(MODULE.EXT ) : $(OUT ) _csv$O $(OUT ) _csv_m.def $(PYTHON.IMPLIB )
545+ $(LD ) $(LDFLAGS.DLL ) -o $@ $(^^ ) $(L^ ) $(LIBS )
546+
529547_hotshot$(MODULE.EXT ) : $(OUT ) _hotshot$O $(OUT ) _hotshot_m.def $(PYTHON.IMPLIB )
530548 $(LD ) $(LDFLAGS.DLL ) -o $@ $(^^ ) $(L^ ) $(LIBS )
531549
0 commit comments