Add a variable %{ackldflags} so I can pass `-fp`.  This change seems
to cause the build to relink every ackprogram, because the link now
needs to use %{ackldflags} even if the flags are empty.
mandelbrot_c_cpm runs in YAZE-AG; startrek_c_cpm doesn't run because
it doesn't fit in the 16-bit address space.
		
	
			
		
			
				
	
	
		
			61 lines
		
	
	
	
		
			978 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
	
		
			978 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| include("plat/build.lua")
 | |
| 
 | |
| local conly = {
 | |
| 	rpi = true
 | |
| }
 | |
| 
 | |
| local softfp = {
 | |
| 	cpm = true,
 | |
| }
 | |
| 
 | |
| local sourcefiles = filenamesof(
 | |
| 	"./hilo.b",
 | |
| 	"./hilo.bas",
 | |
| 	"./hilo.c",
 | |
| 	"./hilo.mod",
 | |
| 	"./hilo.p",
 | |
| 	"./mandelbrot.c",
 | |
| 	"./paranoia.c",
 | |
| 	"./startrek.c"
 | |
| )
 | |
| 
 | |
| local usesfp = {
 | |
| 	["mandelbrot.c"] = true,
 | |
| 	["startrek.c"] = true,
 | |
| }
 | |
| 
 | |
| local installmap = {}
 | |
| for _, file in ipairs(sourcefiles) do
 | |
| 	local b = basename(file)
 | |
| 	local be = replace(b, "%.", "_")
 | |
| 	local _, _, e = b:find("%.(%w*)$")
 | |
| 
 | |
| 	for _, plat in ipairs(vars.plats) do
 | |
| 		local flags = {}
 | |
| 
 | |
| 		if softfp[plat] and usesfp[b] then
 | |
| 			flags[#flags+1] = "-fp"
 | |
| 		end
 | |
| 
 | |
| 		if (e == "c") or not conly[plat] then
 | |
| 			local exe = ackprogram {
 | |
| 				name = be.."_"..plat,
 | |
| 				srcs = { file },
 | |
| 				vars = {
 | |
| 					plat = plat,
 | |
| 					lang = e,
 | |
| 					["+ackldflags"] = flags,
 | |
| 				}
 | |
| 			}
 | |
| 
 | |
| 			installmap["$(PLATIND)/examples/"..be.."."..plat] = exe
 | |
| 		end
 | |
| 	end
 | |
| 	installmap["$(PLATIND)/examples/"..b] = file
 | |
| end
 | |
| 
 | |
| installable {
 | |
| 	name = "pkg",
 | |
| 	map = installmap
 | |
| }
 | |
| 
 |