cpython/RISCOS/Makefile

438 lines
14 KiB
Makefile
Raw Normal View History

2001-03-02 05:58:11 +00:00
# RISC OS Python
LIBSROOT = $.AcornC_C++.Libraries
# You may need to change some of the following
OSLIB = $(LIBSROOT).OSLib
CLIB = $(LIBSROOT).clib
2001-10-24 20:04:51 +00:00
TCPIPLIB = $(LIBSROOT).TCPIPLibs
2001-03-02 05:58:11 +00:00
DLKLIB = $(LIBSROOT).dlk
ZLIB = $(LIBSROOT).zlib
EXPAT = $(LIBSROOT).expat.lib
OBJSCAN = objscan
MAKEDLK = makedlk
2001-03-02 05:58:11 +00:00
# change from time to time (don't forget to change !Boot also)
2001-10-24 20:04:51 +00:00
TARGET=Python22
BUILD=25
2001-03-02 05:58:11 +00:00
#
# You shouldn't need to change anything below this line
#
DLKFLAG= -DDLK
DLKOBJS = $(DLKLIB).o.dlk_load @.o.linktab
2001-03-02 05:58:11 +00:00
2001-10-24 20:04:51 +00:00
HEADERS = @,$(TCPIPLIB),@.^.Include,@.^.Modules,@.^.Objects,@.^.Python,$(CLIB),$(OSLIB),$(DLKLIB)
CFLAGS = -c $(DLKFLAG) -DRISCOS -DHAVE_CONFIG_H -wadP -throwback -APCS 3/32bit/fpe3
2001-03-02 05:58:11 +00:00
2001-10-24 20:04:51 +00:00
CC = cc $(CFLAGS) -j$(HEADERS)
CCEXPAT = cc $(CFLAGS) -j$(HEADERS),$(EXPAT) -DHAVE_EXPAT_H
2001-03-02 05:58:11 +00:00
LINK = link
LINKFLAGS = -aif #-NOUNUSED #-d
2001-10-24 20:04:51 +00:00
LOADLIBS = $(TCPIPLIB).o.unixlib $(TCPIPLIB).o.inetlib $(TCPIPLIB).o.socklib $(CLIB).o.Stubs $(OSLIB).o.OSLib32 $(DLKOBJS)
LIBFILE = libfile -c
2001-03-02 05:58:11 +00:00
.c.o :
$(CC) -o $@ $*.c
2001-10-24 20:04:51 +00:00
MAIN_PYTHON =\
@.^.Modules.o.python
LIB_PYTHON =\
@.^.LibPython
2001-03-02 05:58:11 +00:00
# code for main Python binary
MODULES_STATIC =\
@.^.Modules.o.main\
2001-10-24 20:04:51 +00:00
@.Modules.o.config\
@.^.Modules.o.getbuildinfo\
2001-10-24 20:04:51 +00:00
@.Modules.o.getpath_riscos\
@.Modules.o.riscosmodule\
@.^.Modules.o.gcmodule
2001-03-02 05:58:11 +00:00
# dynamic Modules
MODULES_DYNAMIC =\
@.^.Lib.array/pyd\
@.^.Lib.audioop/pyd\
@.^.Lib.binascii/pyd\
@.^.Lib.cmath/pyd\
@.^.Lib.cPickle/pyd\
@.^.Lib.cStringIO/pyd\
@.^.Lib.errno/pyd\
@.^.Lib.imageop/pyd\
@.^.Lib.math/pyd\
@.^.Lib.md5/pyd\
@.^.Lib.new/pyd\
@.^.Lib.operator/pyd\
@.^.Lib.parser/pyd\
@.^.Lib.pcre/pyd\
@.^.Lib.regex/pyd\
@.^.Lib.rgbimg/pyd\
@.^.Lib.rotor/pyd\
@.^.Lib.sha/pyd\
@.^.Lib.signal/pyd\
@.^.Lib.struct/pyd\
@.^.Lib.time/pyd\
@.^.Lib._locale/pyd\
@.^.Lib.zlib/pyd\
@.^.Lib.select/pyd\
@.^.Lib._socket/pyd\
@.^.Lib._codecs/pyd\
@.^.Lib._weakref/pyd\
@.^.Lib._testcapi/pyd\
@.^.Lib.unicodedata/pyd\
@.^.Lib.xreadlines/pyd\
@.^.Lib.pyexpat/pyd\
@.^.Lib.plat-riscos.drawf/pyd\
@.^.Lib.plat-riscos.swi/pyd\
2001-10-24 20:04:51 +00:00
@.^.Lib._sre/pyd\
@.^.Lib.xxsubtype/pyd\
@.^.Lib._symtable/pyd
OBJECTS_PYTHON =\
@.^.Python.o.traceback\
@.^.Python.o.sysmodule\
@.^.Python.o.structmember\
@.^.Python.o.strdup\
@.^.Python.o.sigcheck\
@.^.Python.o.pythonrun\
@.^.Python.o.pystate\
@.^.Python.o.pyfpe\
@.^.Python.o.mystrtoul\
2001-10-24 20:04:51 +00:00
@.^.Python.o.mysnprintf\
@.^.Python.o.modsupport\
@.^.Python.o.marshal\
@.^.Python.o.importdl\
@.^.Python.o.import\
@.^.Python.o.graminit\
@.^.Python.o.getversion\
@.^.Python.o.getplatform\
@.^.Python.o.getopt\
@.^.Python.o.getcopyright\
@.^.Python.o.getcompiler\
@.^.Python.o.getargs\
@.^.Python.o.frozenmain\
@.^.Python.o.frozen\
@.^.Python.o.errors\
@.^.Python.o.compile\
@.^.Python.o.ceval\
@.^.Python.o.bltinmodule\
@.^.Python.o.exceptions\
@.^.Python.o.hypot\
@.^.Python.o.codecs\
@.^.Python.o.symtable\
@.^.Python.o.future
OBJECTS_RISCOS = \
@.Python.o.dynload_riscos\
@.Python.o.getcwd_riscos\
@.Python.o.getmtime_riscos\
2001-03-02 05:58:11 +00:00
@.o.unixstuff
OBJECTS_OBJECTS =\
@.^.Objects.o.typeobject\
@.^.Objects.o.tupleobject\
@.^.Objects.o.stringobject\
@.^.Objects.o.sliceobject\
@.^.Objects.o.rangeobject\
@.^.Objects.o.object\
@.^.Objects.o.moduleobject\
@.^.Objects.o.methodobject\
@.^.Objects.o.longobject\
@.^.Objects.o.listobject\
@.^.Objects.o.intobject\
2001-10-24 20:04:51 +00:00
@.^.Objects.o.iterobject\
@.^.Objects.o.funcobject\
@.^.Objects.o.frameobject\
@.^.Objects.o.floatobject\
@.^.Objects.o.fileobject\
@.^.Objects.o.dictobject\
@.^.Objects.o.complexobject\
@.^.Objects.o.cobject\
@.^.Objects.o.classobject\
@.^.Objects.o.cellobject\
@.^.Objects.o.bufferobject\
@.^.Objects.o.abstract\
@.^.Objects.o.unicodectype\
2001-10-24 20:04:51 +00:00
@.^.Objects.o.unicodeobject\
@.^.Objects.o.descrobject\
@.^.Objects.o.weakrefobject\
@.^.Objects.o.structseq
2001-03-02 05:58:11 +00:00
OBJECTS_PARSER =\
@.^.Parser.o.tokenizer\
@.^.Parser.o.printgrammar\
@.^.Parser.o.parsetok\
@.^.Parser.o.parser\
@.^.Parser.o.node\
@.^.Parser.o.myreadline\
@.^.Parser.o.metagrammar\
@.^.Parser.o.listnode\
@.^.Parser.o.intrcheck\
@.^.Parser.o.grammar1\
@.^.Parser.o.grammar\
@.^.Parser.o.firstsets\
@.^.Parser.o.bitset\
2001-03-02 05:58:11 +00:00
@.^.Parser.o.acceler
SUPPORT_FILES = @.^.!Boot @.^.!Run @.^.!Sprites @.^.!Sprites22 @.^.AddToPath
OBJECTS = $(OBJECTS_PYTHON) $(OBJECTS_PARSER) $(MODULES_STATIC) $(OBJECTS_OBJECTS) $(OBJECTS_RISCOS)
all: @.^.$(TARGET) $(MODULES_DYNAMIC) $(SUPPORT_FILES)
@.^.Modules.o.getbuildinfo: @.^.Modules.c.getbuildinfo
$(CC) -DBUILD=$(BUILD) -o @.^.Modules.o.getbuildinfo @.^.Modules.c.getbuildinfo
2001-10-24 20:04:51 +00:00
$(LIB_PYTHON): $(OBJECTS)
$(LIBFILE) $(LIB_PYTHON) $(OBJECTS)
@.^.$(TARGET): o.linktab $(MAIN_PYTHON) $(LIB_PYTHON)
$(LINK) -o @.^.$(TARGET) $(MAIN_PYTHON) @.^.LibPython $(LOADLIBS)
2001-03-02 05:58:11 +00:00
#########################################################################
# RISC OS support files
#
2001-03-02 05:58:11 +00:00
@.^.!Boot: support.!Boot
copy support.!Boot @.^.!Boot ~C~VF
settype @.^.!Boot feb
@.^.!Run: support.!Run
copy support.!Run @.^.!Run ~C~VF
settype @.^.!Run feb
@.^.!Sprites: support.!Sprites
copy support.!Sprites @.^.!Sprites ~C~VF
settype @.^.!Sprites ff9
@.^.!Sprites22: support.!Sprites22
copy support.!Sprites22 @.^.!Sprites22 ~C~VF
settype @.^.!Sprites22 ff9
@.^.AddToPath: support.AddToPath
copy support.AddToPath @.^.AddToPath ~C~VF
settype @.^.AddToPath ffc
#########################################################################
# Dynamic Modules
#
@.^.Lib.array/pyd: @.^.Modules.o.arraymodule s.linktab
$(MAKEDLK) -d @.^.Lib.array/pyd -s s.linktab -o @.^.Modules.o.arraymodule -e initarray
@.^.Lib.audioop/pyd: @.^.Modules.o.audioop # s.linktab
$(MAKEDLK) -d @.^.Lib.audioop/pyd -s s.linktab -o @.^.Modules.o.audioop -e initaudioop
@.^.Lib.binascii/pyd: @.^.Modules.o.binascii s.linktab
$(MAKEDLK) -d @.^.Lib.binascii/pyd -s s.linktab -o @.^.Modules.o.binascii -e initbinascii
@.^.Lib.cmath/pyd: @.^.Modules.o.cmathmodule s.linktab
$(MAKEDLK) -d @.^.Lib.cmath/pyd -s s.linktab -o @.^.Modules.o.cmathmodule -e initcmath
@.^.Lib.cPickle/pyd: @.^.Modules.o.cPickle s.linktab
$(MAKEDLK) -d @.^.Lib.cPickle/pyd -s s.linktab -o @.^.Modules.o.cPickle -e initcPickle
@.^.Lib.cStringIO/pyd: @.^.Modules.o.cStringIO s.linktab
$(MAKEDLK) -d @.^.Lib.cStringIO/pyd -s s.linktab -o @.^.Modules.o.cStringIO -e initcStringIO
@.^.Lib.plat-riscos.drawf/pyd: Modules.o.drawfmodule #s.linktab
2001-10-24 20:04:51 +00:00
$(LINK) -aof -o Modules.o.drawflink Modules.o.drawfmodule $(OSLIB).o.OSLIB32
2001-03-02 05:58:11 +00:00
$(MAKEDLK) -d @.^.Lib.plat-riscos.drawf/pyd -s s.linktab -o Modules.o.drawflink -e initdrawf
@.^.Lib.errno/pyd: @.^.Modules.o.errnomodule #s.linktab
$(MAKEDLK) -d @.^.Lib.errno/pyd -s s.linktab -o @.^.Modules.o.errnomodule -e initerrno
@.^.Lib.imageop/pyd: @.^.Modules.o.imageop s.linktab
$(MAKEDLK) -d @.^.Lib.imageop/pyd -s s.linktab -o @.^.Modules.o.imageop -e initimageop
@.^.Lib.math/pyd: @.^.Modules.o.mathmodule s.linktab
$(MAKEDLK) -d @.^.Lib.math/pyd -s s.linktab -o @.^.Modules.o.mathmodule -e initmath
@.^.Lib.mmap/pyd: @.^.Modules.o.mmapmodule s.linktab
$(MAKEDLK) -d @.^.Lib.mmap/pyd -s s.linktab -o @.^.Modules.o.mmapmodule -e initmmap
@.^.Lib.md5/pyd: @.^.Modules.o.md5c @.^.Modules.o.md5module s.linktab
$(LINK) -aof -o @.^.Modules.o.md5link @.^.Modules.o.md5c @.^.Modules.o.md5module
$(MAKEDLK) -d @.^.Lib.md5/pyd -s s.linktab -o @.^.Modules.o.md5link -e initmd5
@.^.Lib.operator/pyd: @.^.Modules.o.operator s.linktab
$(MAKEDLK) -d @.^.Lib.operator/pyd -s s.linktab -o @.^.Modules.o.operator -e initoperator
@.^.Lib.parser/pyd: @.^.Modules.o.parsermodule s.linktab
$(MAKEDLK) -d @.^.Lib.parser/pyd -s s.linktab -o @.^.Modules.o.parsermodule -e initparser
@.^.Lib.pcre/pyd: @.^.Modules.o.pcremodule @.^.Modules.o.pypcre s.linktab
$(LINK) -aof -o @.^.Modules.o.pcrelink @.^.Modules.o.pcremodule @.^.Modules.o.pypcre
$(MAKEDLK) -d @.^.Lib.pcre/pyd -s s.linktab -o @.^.Modules.o.pcrelink -e initpcre
@.^.Lib.regex/pyd: @.^.Modules.o.regexmodule @.^.Modules.o.regexpr s.linktab
$(LINK) -aof -o @.^.Modules.o.regexlink @.^.Modules.o.regexmodule @.^.Modules.o.regexpr
$(MAKEDLK) -d @.^.Lib.regex/pyd -s s.linktab -o @.^.Modules.o.regexlink -e initregex
@.^.Lib.rgbimg/pyd: @.^.Modules.o.rgbimgmodule s.linktab
$(MAKEDLK) -d @.^.Lib.rgbimg/pyd -s s.linktab -o @.^.Modules.o.rgbimgmodule -e initrgbimg
@.^.Lib.rotor/pyd: @.^.Modules.o.rotormodule s.linktab
$(MAKEDLK) -d @.^.Lib.rotor/pyd -s s.linktab -o @.^.Modules.o.rotormodule -e initrotor
@.^.Lib.sha/pyd: @.^.Modules.o.shamodule s.linktab
$(MAKEDLK) -d @.^.Lib.sha/pyd -s s.linktab -o @.^.Modules.o.shamodule -e initsha
@.^.Lib.signal/pyd: @.^.Modules.o.signalmodule s.linktab
$(MAKEDLK) -d @.^.Lib.signal/pyd -s s.linktab -o @.^.Modules.o.signalmodule -e initsignal
@.^.Lib.strop/pyd: @.^.Modules.o.stropmodule s.linktab
$(MAKEDLK) -d @.^.Lib.strop/pyd -s s.linktab -o @.^.Modules.o.stropmodule -e initstrop
@.^.Lib.struct/pyd: @.^.Modules.o.structmodule s.linktab
$(MAKEDLK) -d @.^.Lib.struct/pyd -s s.linktab -o @.^.Modules.o.structmodule -e initstruct
@.^.Lib.plat-riscos.swi/pyd: Modules.o.swimodule s.linktab
2001-10-24 20:04:51 +00:00
$(LINK) -aof -o Modules.o.swilink Modules.o.swimodule $(OSLIB).o.OSLIB32
2001-03-02 05:58:11 +00:00
$(MAKEDLK) -d @.^.Lib.plat-riscos.swi/pyd -s s.linktab -o Modules.o.swilink -e initswi
@.^.Lib._locale/pyd: @.^.Modules.o._localemodule s.linktab
$(MAKEDLK) -d @.^.Lib._locale/pyd -s s.linktab -o @.^.Modules.o._localemodule -e init_locale
@.^.Lib._sre/pyd: @.^.Modules.o._sre s.linktab
$(MAKEDLK) -d @.^.Lib._sre/pyd -s s.linktab -o @.^.Modules.o._sre -e init_sre
@.^.Lib._codecs/pyd: @.^.Modules.o._codecsmodule s.linktab
$(MAKEDLK) -d @.^.Lib._codecs/pyd -s s.linktab -o @.^.Modules.o._codecsmodule -e init_codecs
@.^.Lib._weakref/pyd: @.^.Modules.o._weakref s.linktab
$(MAKEDLK) -d @.^.Lib._weakref/pyd -s s.linktab -o @.^.Modules.o._weakref -e init_weakref
@.^.Lib._testcapi/pyd: @.^.Modules.o._testcapimodule s.linktab
$(MAKEDLK) -d @.^.Lib._testcapi/pyd -s s.linktab -o @.^.Modules.o._testcapimodule -e init_testcapi
@.^.Lib.unicodedata/pyd: @.^.Modules.o.unicodedata s.linktab
$(MAKEDLK) -d @.^.Lib.unicodedata/pyd -s s.linktab -o @.^.Modules.o.unicodedata -e initunicodedata
@.^.Lib.xreadlines/pyd: @.^.Modules.o.xreadlinesmodule s.linktab
$(MAKEDLK) -d @.^.Lib.xreadlines/pyd -s s.linktab -o @.^.Modules.o.xreadlinesmodule -e initxreadlines
2001-10-24 20:04:51 +00:00
@.^.Lib.xxsubtype/pyd: @.^.Modules.o.xxsubtype s.linktab
$(MAKEDLK) -d @.^.Lib.xxsubtype/pyd -s s.linktab -o @.^.Modules.o.xxsubtype -e initxxsubtype
@.^.Lib._symtable/pyd: @.^.Modules.o.symtablemodule s.linktab
$(MAKEDLK) -d @.^.Lib._symtable/pyd -s s.linktab -o @.^.Modules.o.symtablemodule -e init_symtable
2001-03-02 05:58:11 +00:00
############################################################################
# Dynamic Modules with other dependencies
#
@.^.Lib.select/pyd: @.^.Modules.o.selectmodule s.linktab
2001-10-24 20:04:51 +00:00
$(LINK) -aof -o @.^.Modules.o.selectlink @.^.Modules.o.selectmodule $(TCPIPLIB).o.socklib
2001-03-02 05:58:11 +00:00
$(MAKEDLK) -d @.^.Lib.select/pyd -s s.linktab -o @.^.Modules.o.selectlink -e initselect
@.^.Modules.o.selectmodule: @.^.Modules.c.selectmodule
2001-10-24 20:04:51 +00:00
$(CC) -I$(TCPIPLIB).include -o $@ @.^.Modules.c.selectmodule
2001-03-02 05:58:11 +00:00
@.^.Lib._socket/pyd: @.^.Modules.o.socketmodule s.linktab
2001-10-24 20:04:51 +00:00
$(LINK) -aof -o @.^.Modules.o._socketlink @.^.Modules.o.socketmodule $(TCPIPLIB).o.inetlib $(TCPIPLIB).o.unixlib $(TCPIPLIB).o.socklib
2001-03-02 05:58:11 +00:00
$(MAKEDLK) -d @.^.Lib._socket/pyd -s s.linktab -o @.^.Modules.o._socketlink -e init_socket
@.^.Modules.o.socketmodule: @.^.Modules.c.socketmodule
2001-10-24 20:04:51 +00:00
$(CC) -I$(TCPIPLIB).include -o $@ @.^.Modules.c.socketmodule
2001-03-02 05:58:11 +00:00
@.^.Lib.zlib/pyd: @.^.Modules.o.zlibmodule s.linktab
2001-10-24 20:04:51 +00:00
$(LINK) -aof -o @.^.Modules.o.zliblink @.^.Modules.o.zlibmodule $(ZLIB).zlib
2001-03-02 05:58:11 +00:00
$(MAKEDLK) -d @.^.Lib.zlib/pyd -s s.linktab -o @.^.Modules.o.zliblink -e initzlib
@.^.Modules.o.zlibmodule: @.^.Modules.c.zlibmodule
$(CC) -I$(ZLIB) -o $@ @.^.Modules.c.zlibmodule
@.^.Lib.time/pyd: @.^.Modules.o.timemodule s.linktab @.o.sleep
2001-10-24 20:04:51 +00:00
$(LINK) -aof -o @.^.Modules.o.timelink @.^.Modules.o.timemodule @.o.sleep $(OSLIB).o.OSLib32
$(MAKEDLK) -d @.^.Lib.time/pyd -s s.linktab -o @.^.Modules.o.timelink -e inittime
2001-10-24 20:04:51 +00:00
#@.^.Lib.time/pyd: @.Modules.o.timemodule s.linktab
# $(LINK) -aof -o @.Modules.o.timelink @.Modules.o.timemodule $(OSLIB).o.OSLib32
# $(MAKEDLK) -d @.^.Lib.time/pyd -s s.linktab -o @.Modules.o.timelink -e inittime
2001-03-02 05:58:11 +00:00
@.^.Lib.pyexpat/pyd: @.^.Modules.o.pyexpat s.linktab
$(LINK) -aof -o @.^.Modules.o.pyexpatlink @.^.Modules.o.pyexpat $(EXPAT).expat_lib
$(MAKEDLK) -d @.^.Lib.pyexpat/pyd -s s.linktab -o @.^.Modules.o.pyexpatlink -e initpyexpat
@.^.Modules.o.pyexpat: @.^.Modules.c.pyexpat
$(CCEXPAT) -o $@ @.^.Modules.c.pyexpat
##########################################################################
# dynamic linking symbol table
#
2001-03-02 05:58:11 +00:00
o.linktab: s.linktab
2001-10-24 20:04:51 +00:00
ObjAsm -APCS 3/32bit s.linktab o.linktab
2001-03-02 05:58:11 +00:00
s.linktab: $(OBJECTS)
$(OBJSCAN) -s s.linktab -o $(OBJECTS) $(clib).o.stubs
##########################################################################
# special targets
#
libclean:
2001-10-24 20:04:51 +00:00
-wipe @.^.Lib.*/pyc ~C~V
-wipe @.^.Lib.*/pyo ~C~V
-wipe @.^.Lib.plat-riscos.*/pyc ~C~V
-wipe @.^.Lib.plat-riscos.*/pyo ~C~V
-wipe @.^.Lib.test.*/pyc ~C~V
-wipe @.^.Lib.test.*/pyo ~C~V
-wipe @.^.Lib.encodings.*/pyc ~C~V
-wipe @.^.Lib.encodings.*/pyo ~C~V
-wipe @.^.Lib.curses.*/pyc ~C~V
-wipe @.^.Lib.curses.*/pyo ~C~V
-wipe @.^.Lib.xml.*/pyc ~C~V
-wipe @.^.Lib.xml.*/pyo ~C~V
-wipe @.^.Lib.xml.sax.*/pyc ~C~V
-wipe @.^.Lib.xml.sax.*/pyo ~C~V
-wipe @.^.Lib.xml.dom.*/pyc ~C~V
-wipe @.^.Lib.xml.dom.*/pyo ~C~V
-wipe @.^.Lib.xml.parsers.*/pyc ~C~V
-wipe @.^.Lib.xml.parsers.*/pyo ~C~V
2001-03-02 05:58:11 +00:00
clean: libclean
2001-10-24 20:04:51 +00:00
-wipe @.^.Modules.o.* ~C~V
-wipe @.^.Objects.o.* ~C~V
-wipe @.^.Parser.o.* ~C~V
-wipe @.^.Python.o.* ~C~V
-wipe @.Modules.o.* ~C~V
-wipe @.Python.o.* ~C~V
-wipe @.o.* ~C ~V
rebuild: clean clean-support
remove @.^.$(TARGET)
-wipe @.^.Lib.*/pyd ~C ~V
-wipe @.^.Lib.plat-riscos.*/pyd ~C~V
remove s.linktab
remove @.^.LibPython
2001-10-24 20:04:51 +00:00
clean-support:
-wipe @.^.!* ~C~V
remove @.^.AddToPath
2001-03-02 05:58:11 +00:00
cdirs:
cdir @.Modules.o
cdir @.Python.o
cdir @.s
cdir @.o
cdir @.^.Python.o
cdir @.^.Parser.o
cdir @.^.Objects.o
cdir @.^.Modules.o
# Dynamic dependencies: