Use ack -mcpm -fp for mandelbrot.c, startrek.c
				
					
				
			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.
			
			
This commit is contained in:
		
							parent
							
								
									1df4db99c9
								
							
						
					
					
						commit
						4a3b7be795
					
				
					 3 changed files with 18 additions and 1 deletions
				
			
		|  | @ -4,6 +4,7 @@ vars.cflags = { | |||
| vars.ackcflags = { | ||||
| 	"-O6" | ||||
| } | ||||
| vars.ackldflags = {} | ||||
| vars.plats = { | ||||
| 	"cpm", | ||||
| 	"linux386", | ||||
|  |  | |||
|  | @ -4,6 +4,10 @@ local conly = { | |||
| 	rpi = true | ||||
| } | ||||
| 
 | ||||
| local softfp = { | ||||
| 	cpm = true, | ||||
| } | ||||
| 
 | ||||
| local sourcefiles = filenamesof( | ||||
| 	"./hilo.b", | ||||
| 	"./hilo.bas", | ||||
|  | @ -15,6 +19,11 @@ local sourcefiles = filenamesof( | |||
| 	"./startrek.c" | ||||
| ) | ||||
| 
 | ||||
| local usesfp = { | ||||
| 	["mandelbrot.c"] = true, | ||||
| 	["startrek.c"] = true, | ||||
| } | ||||
| 
 | ||||
| local installmap = {} | ||||
| for _, file in ipairs(sourcefiles) do | ||||
| 	local b = basename(file) | ||||
|  | @ -22,6 +31,12 @@ for _, file in ipairs(sourcefiles) do | |||
| 	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, | ||||
|  | @ -29,6 +44,7 @@ for _, file in ipairs(sourcefiles) do | |||
| 				vars = { | ||||
| 					plat = plat, | ||||
| 					lang = e, | ||||
| 					["+ackldflags"] = flags, | ||||
| 				} | ||||
| 			} | ||||
| 
 | ||||
|  |  | |||
|  | @ -91,7 +91,7 @@ definerule("ackprogram", | |||
| 			}, | ||||
| 			_clibrary = acklibrary, | ||||
| 			commands = { | ||||
| 				"ACKDIR=$(INSDIR) $(INSDIR)/bin/ack -m%{plat} -.%{lang} -o %{outs} %{ins}" | ||||
| 				"ACKDIR=$(INSDIR) $(INSDIR)/bin/ack -m%{plat} -.%{lang} -o %{outs} %{ins} %{ackldflags}" | ||||
| 			} | ||||
| 		} | ||||
| 	end | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue