shithub: mc

Download patch

ref: 57489450db3e9b5c904a7fe29ce345163206b14f
parent: 6f7129fd1e2b094e42cbfa2752222a7e61b5c298
author: Ori Bernstein <[email protected]>
date: Thu Jun 19 07:51:08 EDT 2014

Make system/arch dependent rules generic.

    Use a wild card rule for the copying.

--- a/libstd/Makefile
+++ b/libstd/Makefile
@@ -59,20 +59,11 @@
 
 all: lib$(MYRLIB).a $(MYRBIN) test
 
-sys.myr: sys-$(SYS).myr
-	cp sys-$(SYS).myr sys.myr
+%.myr: %-$(SYS).myr
+	cp $< $@
 
-ifreq.myr: ifreq-$(SYS).myr
-	cp ifreq-$(SYS).myr ifreq.myr
-
-waitstatus.myr: waitstatus-$(SYS).myr
-	cp waitstatus-$(SYS).myr waitstatus.myr
-
-syscall.s: syscall-$(SYS).s
-	cp syscall-$(SYS).s syscall.s
-
-start.s: start-$(SYS).s
-	cp start-$(SYS).s start.s
+%.s: %-$(SYS).s
+	cp $< $@
 
 test: libstd.a test.myr ../6/6m
 	../myrbuild/myrbuild -C../6/6m -M../muse/muse -b test -I. test.myr