1 line
7.8 KiB
Makefile
1 line
7.8 KiB
Makefile
# File: Makefile
|
|
# Target: TestEcho (MPW 3.1 libraries), ElWhip (MPW 3.1 libraries)
|
|
# Created: Sunday, November 29, 2009 11:11:08 PM
|
|
#
|
|
# ElWhip uses MPW 3.5 and Link (rather than iLink) and the Libraries and Interfaces
|
|
# from MPW 3.1 to build a program to run on all System versions,
|
|
# even earlier than System 6.08.
|
|
# Copy (or make an Alias of) the Interfaces:CIncludes and Libraries folders from
|
|
# MPW 3.1 and name them Interfaces:CIncludes-3.1 and Libraries-3.1
|
|
#
|
|
# If you just want to build for 3.5 libraries (losing older system compatibility),
|
|
# change:
|
|
# IncFiles = -i {Includes-68K} {Includes}
|
|
# COptions = -includes unix {IncFiles} {Sym-68K} -mbg off -model near -opt space -w off #-d LIBS_OLD
|
|
# LibFiles = {LibFiles-68K}
|
|
|
|
Program = "ElWhip"
|
|
MAKEFILE = MakeFile
|
|
#¥MondoBuild¥ = {MAKEFILE} # Make blank to avoid rebuilds when makefile is modified
|
|
¥MondoBuild¥ =
|
|
|
|
Vers = v0.7.1
|
|
|
|
ObjDir = :
|
|
SrcDir = ::::lwip:src:
|
|
IncDir = {SrcDir}include:
|
|
APISrc = "{SrcDir}api:"
|
|
CoreSrc = "{SrcDir}core:"
|
|
IPV4Src = "{CoreSrc}ipv4:"
|
|
NetISrc = "{SrcDir}netif:"
|
|
PPPISrc = "{NetISrc}ppp:"
|
|
|
|
ContribDir = :::
|
|
PortsDir = {ContribDir}ports:
|
|
AppsDir = {ContribDir}apps:
|
|
MacSrc = {PortsDir}mac:
|
|
|
|
Includes-Old = "{CIncludes}:CIncludes-3.1:"
|
|
Includes-68K = "{CIncludes}"
|
|
|
|
Includes = ¶
|
|
-i {MacSrc}include: ¶
|
|
-i {MacSrc}include:arch: ¶
|
|
-i {AppsDir} ¶
|
|
-i {IncDir} ¶
|
|
-i {IncDir}lwip: ¶
|
|
-i {IncDir}ipv4: ¶
|
|
-i {IncDir}ipv6: ¶
|
|
-i {IncDir}netif: ¶
|
|
-i {AppsDir}httpserver_raw: ¶
|
|
-i {IncDir}netif:ppp:
|
|
# -i {IncDir}netif:ppp:polarssl:
|
|
|
|
IncFiles = -i {Includes-Old} {Includes}
|
|
|
|
Sym-68K = -sym off
|
|
|
|
COptions = -includes unix {IncFiles} {Sym-68K} -mbg off -model near -opt space -w off -d LIBS_OLD
|
|
|
|
LOptions = -mf -d -t 'APPL' -c 'LWIP' -model near
|
|
|
|
AddDebugOpt = -d LWIP_DEBUG -u LWIP_NOASSERT
|
|
|
|
NoDebugOpt = -u LWIP_DEBUG -d LWIP_NOASSERT
|
|
|
|
|
|
### Source Files ###
|
|
|
|
SrcFiles = {MacSrc}test.c ¶
|
|
{MacSrc}sys_arch.c ¶
|
|
{MacSrc}sio.c ¶
|
|
# {AppsDir}tcpecho_raw:echo.c ¶
|
|
{AppsDir}httpserver_raw:httpd.c ¶
|
|
{AppsDir}httpserver_raw:fs.c ¶
|
|
{APISrc}err.c ¶
|
|
# {CoreSrc}init.c ¶
|
|
# {CoreSrc}mem.c ¶
|
|
{CoreSrc}memp.c ¶
|
|
{CoreSrc}netif.c ¶
|
|
{CoreSrc}inet_chksum.c ¶
|
|
{CoreSrc}pbuf.c ¶
|
|
{CoreSrc}raw.c ¶
|
|
# {CoreSrc}stats.c ¶
|
|
{CoreSrc}tcp_in.c ¶
|
|
{CoreSrc}tcp_out.c ¶
|
|
{CoreSrc}tcp.c ¶
|
|
# {CoreSrc}udp.c ¶
|
|
{CoreSrc}timers.c ¶
|
|
# {IPV4Src}icmp.c ¶
|
|
# {IPV4Src}igmp.c ¶
|
|
{IPV4Src}ip4.c ¶
|
|
{IPV4Src}ip4_addr.c ¶
|
|
# {IPV4Src}ip_frag.c ¶
|
|
# {NetISrc}etharp.c ¶
|
|
# {NetISrc}slipif.c ¶
|
|
{PPPISrc}ppp.c ¶
|
|
{PPPISrc}lcp.c ¶
|
|
{PPPISrc}magic.c ¶
|
|
{PPPISrc}auth.c ¶
|
|
# {PPPISrc}upap.c ¶
|
|
{PPPISrc}ipcp.c ¶
|
|
{PPPISrc}utils.c ¶
|
|
{PPPISrc}fsm.c
|
|
# {PPPISrc}polarssl:md5.c
|
|
|
|
### Object Files ###
|
|
|
|
ObjectFiles = "{MacSrc}sys_arch.c.l.o" ¶
|
|
"{MacSrc}sio.c.p.o" ¶
|
|
# "{AppsDir}echo.c.a.o" ¶
|
|
"{AppsDir}httpserver_raw:httpd.c.a.o" ¶
|
|
"{AppsDir}httpserver_raw:fs.c.a.o" ¶
|
|
"{SrcDir}err.c.l.o" ¶
|
|
# "{SrcDir}init.c.l.o" ¶
|
|
# "{SrcDir}mem.c.l.o" ¶
|
|
"{SrcDir}memp.c.l.o" ¶
|
|
"{SrcDir}netif.c.ud.o" ¶
|
|
"{SrcDir}inet_chksum.c.l.o" ¶
|
|
"{SrcDir}pbuf.c.l.o" ¶
|
|
"{SrcDir}raw.c.l.o" ¶
|
|
# "{SrcDir}stats.c.l.o" ¶
|
|
"{SrcDir}tcp_in.c.l.o" ¶
|
|
"{SrcDir}tcp_out.c.l.o" ¶
|
|
"{SrcDir}tcp.c.l.o" ¶
|
|
# "{SrcDir}udp.c.l.o" ¶
|
|
"{SrcDir}timers.c.l.o" ¶
|
|
# "{SrcDir}autoip.c.l.o" ¶
|
|
# "{SrcDir}icmp.c.l.o" ¶
|
|
# "{SrcDir}igmp.c.l.o" ¶
|
|
"{SrcDir}ip4.c.l.o" ¶
|
|
"{SrcDir}ip4_addr.c.l.o" ¶
|
|
# "{SrcDir}ip_frag.c.l.o" ¶
|
|
# "{NetISrc}etharp.c.l.o" ¶
|
|
# "{NetISrc}slipif.c.p.o" ¶
|
|
"{NetISrc}ppp.c.p.o" ¶
|
|
"{NetISrc}lcp.c.ud.o" ¶
|
|
"{NetISrc}magic.c.p.o" ¶
|
|
"{NetISrc}auth.c.ud.o" ¶
|
|
# "{NetISrc}upap.c.p.o" ¶
|
|
"{NetISrc}ipcp.c.ud.o" ¶
|
|
"{NetISrc}utils.c.p.o" ¶
|
|
"{NetISrc}fsm.c.ud.o"
|
|
# "{NetISrc}md5.c.p.o"
|
|
|
|
|
|
### Libraries ###
|
|
# Use the Libraries from MPW 3.1
|
|
CLibraries-Old = {CLibraries}::Libraries-3.1:CLibraries:
|
|
Libraries-Old = {Libraries}::Libraries-3.1:Libraries:
|
|
|
|
|
|
LibFiles-Old = ¶
|
|
# "{CLibraries-Old}CSANELib.o" ¶
|
|
# "{CLibraries-Old}Math.o" ¶
|
|
# "{CLibraries-Old}Complex.o" ¶
|
|
"{CLibraries-Old}StdCLib.o" ¶
|
|
"{CLibraries-Old}CInterface.o" ¶
|
|
"{CLibraries-Old}CRuntime.o" ¶
|
|
# "{Libraries-Old}ToolLibs.o" ¶
|
|
# "{Libraries-Old}Runtime.o" ¶
|
|
"{Libraries-Old}Interface.o"
|
|
|
|
LibFiles-68K = ¶
|
|
# "{Libraries}MathLib.o" ¶
|
|
"{CLibraries}StdCLib.o" ¶
|
|
"{Libraries}MacRuntime.o" ¶
|
|
"{Libraries}IntEnv.o" ¶
|
|
"{Libraries}Interface.o"
|
|
|
|
LibFiles = {LibFiles-Old}
|
|
|
|
# Special case because of the /r/n issues.
|
|
"{AppsDir}httpserver_raw:httpd.c.a.o" Ä "{AppsDir}httpserver_raw:httpd.c"
|
|
{C} {Deps} -o {Targ} {COptions} -noMapCR {NoDebugOpt} -seg LWAPP
|
|
|
|
### Default Rules ###
|
|
|
|
.c.m.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.m.o {COptions} {NoDebugOpt} -seg Main
|
|
|
|
.c.n.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.n.o {COptions} {NoDebugOpt} -seg Main -d TEST_MAIN_DISABLE
|
|
|
|
.c.pp.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.pp.o {COptions} {NoDebugOpt} -seg LWPPPL
|
|
|
|
.c.p.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.p.o {COptions} {NoDebugOpt} -seg LWPPP
|
|
|
|
.c.ud.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.ud.o {COptions} {NoDebugOpt} -seg LWUPDN
|
|
|
|
.c.a.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.a.o {COptions} {NoDebugOpt} -seg LWAPP
|
|
|
|
.c.l.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.l.o {COptions} {NoDebugOpt} -seg LWTCPIP
|
|
|
|
.c.o Ä .c {¥MondoBuild¥}
|
|
{C} {depDir}{default}.c -o {targDir}{default}.c.o {COptions} {NoDebugOpt} -seg Main
|
|
|
|
|
|
{MacSrc} Ä {MacSrc}
|
|
{NetISrc} Ä {NetISrc} {PPPISrc}
|
|
{SrcDir} Ä {CoreSrc} {IPV4Src} {APISrc}
|
|
|
|
### Build Rules ###
|
|
|
|
TestEcho ÄÄ "{MacSrc}test.c.m.o" {ObjectFiles} {LibFiles} {¥MondoBuild¥}
|
|
Link ¶
|
|
-o {Targ} ¶
|
|
"{MacSrc}test.c.m.o" ¶
|
|
{ObjectFiles} ¶
|
|
{LibFiles} ¶
|
|
{Sym-68K} ¶
|
|
{LOptions}
|
|
If "{Sym-68K}" =~ /-sym Å[nNuU]Å/
|
|
ILinkToSYM {Targ}.NJ -mf -sym 3.2 -c 'sade'
|
|
End
|
|
|
|
|
|
CObjs = "{MacSrc}test.c.n.o" ¶
|
|
"{MacSrc}ElWhip.c.n.o" ¶
|
|
{ObjectFiles}
|
|
|
|
|
|
Clean Ä
|
|
Delete {CObjs}
|
|
Delete ElWhip.dmg
|
|
Delete ElWhip
|
|
Delete Å.makeout
|
|
Delete Å.out
|
|
|
|
|
|
ElWhip ÄÄ {CObjs} {LibFiles} {¥MondoBuild¥}
|
|
Link ¶
|
|
-o {Targ} ¶
|
|
{CObjs} ¶
|
|
{LibFiles} ¶
|
|
{Sym-68K} ¶
|
|
{LOptions}
|
|
|
|
ElWhip ÄÄ ElWhip.r ElWhip_ICN.r ElWhip.h {¥MondoBuild¥}
|
|
Rez -rd -o {Targ} ElWhip.r -append
|
|
# Don't Use rsrc files
|
|
# DeRez "ElWhip_ICN.rsrc" | Rez -o {Targ} -append
|
|
Rez -rd -o {Targ} ElWhip_ICN.r -append
|
|
SetFile -a BC {Targ}
|
|
|
|
|
|
#ElWhip-distrib Ä ElWhip
|
|
|
|
DiskImg = ':400K.dmg'
|
|
|
|
{Program}.dmg Ä {Program}
|
|
Duplicate {DiskImg} {Targ}
|
|
Open -f {Targ}
|
|
Alert "Click OK after the volume mounts to continue..."
|
|
Loop
|
|
If `Exists {Deps}:`
|
|
Break
|
|
End
|
|
End
|
|
Duplicate :{Deps} {Deps}:
|
|
SetFile -a BC {Deps}
|
|
Duplicate :www:[Â.]Å {Deps}:
|
|
# Convert to mac line feeds and output a copy
|
|
StreamEdit {ContribDir}README.md -o {Deps}:Readme.txt
|
|
SetFile -t TEXT {Deps}:Readme.txt
|
|
Rename {Deps}: {Deps}_{Vers}:
|
|
Eject {Deps}_{Vers}:
|
|
|
|
|
|
.img Ä .dmg
|
|
Duplicate {Deps} {Targ}
|
|
|
|
ElWhip-vMac Ä ElWhip {DiskImg}
|
|
Open -f 'Mac OS X:Users:epooch:Documents:MacOS6.dmg'
|
|
Alert "Click OK after the volume mounts to continue..."
|
|
Loop
|
|
If `Exists 'MacOS6:'`
|
|
Break
|
|
End
|
|
End
|
|
Duplicate ElWhip 'MacOS6:ElWhip-vMac';
|
|
Eject MacOS6
|
|
|
|
### Optional Dependencies ###
|
|
### Build this target to generate "include file" dependencies. ###
|
|
|
|
Dependencies Ä $OutOfDate
|
|
MakeDepend ¶
|
|
-append {MAKEFILE} ¶
|
|
-ignore "{CIncludes}" ¶
|
|
-objdir "{ObjDir}" ¶
|
|
-objext .o ¶
|
|
{IncFiles} ¶
|
|
{SrcFiles}
|