From 1817a0c73f6aef9e69f7105ad19ca78ad6cbffd9 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sat, 2 Feb 2019 15:25:21 +0100 Subject: compress42 --- test/monniaux/ncompress/Makefile | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 test/monniaux/ncompress/Makefile (limited to 'test/monniaux/ncompress/Makefile') diff --git a/test/monniaux/ncompress/Makefile b/test/monniaux/ncompress/Makefile new file mode 100644 index 00000000..37743851 --- /dev/null +++ b/test/monniaux/ncompress/Makefile @@ -0,0 +1,56 @@ +CFLAGS=-Wall -O3 +CCOMPFLAGS=-Wall -O3 -D_DEFAULT_SOURCE +CCOMP=ccomp +EXECUTE=k1-cluster --syscall=libstd_scalls.so -- + +K1C_CC=k1-mbr-gcc +K1C_CFLAGS=-Wall -O3 -std=c99 +K1C_CCOMP=../../../ccomp +K1C_CCOMPFLAGS=-Wall -O3 + +all: check + +%.gcc.k1c.s: %.c + $(K1C_CC) $(K1C_CFLAGS) -S $< -o $@ + +%.gcc.k1c.o: %.gcc.k1c.s + $(K1C_CC) $(K1C_CFLAGS) -c $< -o $@ + +%.ccomp.k1c.s: %.c + $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@ + +%.ccomp.k1c.o: %.ccomp.k1c.s + $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@ + +all: compress.gcc.host compress.ccomp.host compress.gcc.k1c compress.ccomp.k1c + +compress.gcc.host : compress42.c + $(CC) $(CFLAGS) $< -o $@ + +compress.ccomp.host : compress42.c + $(CCOMP) $(CCOMPFLAGS) $< -o $@ + +compress.gcc.k1c : compress42.gcc.k1c.o + $(K1C_CC) $(K1C_CFLAGS) $< -o $@ + +compress.ccomp.k1c : compress42.ccomp.k1c.o + $(K1C_CCOMP) $(K1C_CCOMPFLAGS) $< -o $@ + +INFILE=Makefile +COMPRESSED=foo.gcc.host.Z + +foo.gcc.host.Z: compress.gcc.host $(INFILE) + ./compress.gcc.host <$(INFILE) >$@ + +foo.ccomp.k1c.Z: compress.ccomp.k1c $(INFILE) + $(EXECUTE) ./compress.ccomp.k1c <$(INFILE) >$@ + +foo.gcc.host.txt: compress.gcc.host $(COMPRESSED) + ./compress.gcc.host -d <$(COMPRESSED) >$@ + +foo.ccomp.k1c.txt: compress.gcc.host $(COMPRESSED) + $(EXECUTE) ./compress.ccomp.k1c -d <$(COMPRESSED) >$@ + +check: foo.gcc.host.Z foo.ccomp.k1c.Z foo.gcc.host.txt foo.ccomp.k1c.txt + cmp foo.gcc.host.Z foo.ccomp.k1c.Z + cmp foo.gcc.host.txt foo.ccomp.k1c.txt -- cgit From e6890cc9d54dde37921e263daac03e1d9b8eee1e Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Sat, 2 Feb 2019 15:57:48 +0100 Subject: better Makefile and printouts --- test/monniaux/ncompress/Makefile | 44 ++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'test/monniaux/ncompress/Makefile') diff --git a/test/monniaux/ncompress/Makefile b/test/monniaux/ncompress/Makefile index 37743851..960d04d0 100644 --- a/test/monniaux/ncompress/Makefile +++ b/test/monniaux/ncompress/Makefile @@ -22,35 +22,53 @@ all: check %.ccomp.k1c.o: %.ccomp.k1c.s $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@ +%.gcc.host.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + all: compress.gcc.host compress.ccomp.host compress.gcc.k1c compress.ccomp.k1c -compress.gcc.host : compress42.c - $(CC) $(CFLAGS) $< -o $@ +compress.gcc.host : compress42.c ../clock.gcc.host.o + $(CC) $(CFLAGS) $+ -o $@ -compress.ccomp.host : compress42.c - $(CCOMP) $(CCOMPFLAGS) $< -o $@ +compress.ccomp.host : compress42.c ../clock.gcc.host.o + $(CCOMP) $(CCOMPFLAGS) $+ -o $@ -compress.gcc.k1c : compress42.gcc.k1c.o - $(K1C_CC) $(K1C_CFLAGS) $< -o $@ +compress.gcc.k1c : compress42.gcc.k1c.o ../clock.gcc.k1c.o + $(K1C_CC) $(K1C_CFLAGS) $+ -o $@ -compress.ccomp.k1c : compress42.ccomp.k1c.o - $(K1C_CCOMP) $(K1C_CCOMPFLAGS) $< -o $@ +compress.ccomp.k1c : compress42.ccomp.k1c.o ../clock.gcc.k1c.o + $(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@ INFILE=Makefile COMPRESSED=foo.gcc.host.Z foo.gcc.host.Z: compress.gcc.host $(INFILE) - ./compress.gcc.host <$(INFILE) >$@ + ./compress.gcc.host <$(INFILE) >foo.gcc.host.Z 2> foo.gcc.host.Z.out foo.ccomp.k1c.Z: compress.ccomp.k1c $(INFILE) - $(EXECUTE) ./compress.ccomp.k1c <$(INFILE) >$@ + $(EXECUTE) ./compress.ccomp.k1c <$(INFILE) >foo.ccomp.k1c.Z 2> foo.ccomp.k1c.Z.out + +foo.gcc.k1c.Z: compress.gcc.k1c $(INFILE) + $(EXECUTE) ./compress.gcc.k1c <$(INFILE) >foo.gcc.k1c.Z 2> foo.gcc.k1c.Z.out foo.gcc.host.txt: compress.gcc.host $(COMPRESSED) - ./compress.gcc.host -d <$(COMPRESSED) >$@ + ./compress.gcc.host -d <$(COMPRESSED) >foo.gcc.host.txt 2> foo.gcc.host.txt.out foo.ccomp.k1c.txt: compress.gcc.host $(COMPRESSED) - $(EXECUTE) ./compress.ccomp.k1c -d <$(COMPRESSED) >$@ + $(EXECUTE) ./compress.ccomp.k1c -d <$(COMPRESSED) >foo.ccomp.k1c.txt 2> foo.ccomp.k1c.txt.out + +foo.gcc.k1c.txt: compress.gcc.host $(COMPRESSED) + $(EXECUTE) ./compress.gcc.k1c -d <$(COMPRESSED) >foo.gcc.k1c.txt 2> foo.gcc.k1c.txt.out -check: foo.gcc.host.Z foo.ccomp.k1c.Z foo.gcc.host.txt foo.ccomp.k1c.txt +check: foo.gcc.host.Z foo.gcc.host.txt foo.ccomp.k1c.Z foo.ccomp.k1c.txt foo.gcc.k1c.Z foo.gcc.k1c.txt cmp foo.gcc.host.Z foo.ccomp.k1c.Z + cmp foo.gcc.host.Z foo.gcc.k1c.Z cmp foo.gcc.host.txt foo.ccomp.k1c.txt + cmp foo.gcc.host.txt foo.gcc.k1c.txt + +clean: + rm -f *.Z *.txt *.out *.o *.s *.host *.k1c + +.PHONY: clean + +.SECONDARY: %.s -- cgit From e8b35c4b975a46a5dc5e0c022897359cbfe2d72b Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 6 Feb 2019 18:45:04 +0100 Subject: Makefiles now use rules.mk, and added a prohibition of unprototyped functions --- test/monniaux/ncompress/Makefile | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'test/monniaux/ncompress/Makefile') diff --git a/test/monniaux/ncompress/Makefile b/test/monniaux/ncompress/Makefile index 960d04d0..cf543976 100644 --- a/test/monniaux/ncompress/Makefile +++ b/test/monniaux/ncompress/Makefile @@ -1,29 +1,7 @@ -CFLAGS=-Wall -O3 -CCOMPFLAGS=-Wall -O3 -D_DEFAULT_SOURCE -CCOMP=ccomp -EXECUTE=k1-cluster --syscall=libstd_scalls.so -- - -K1C_CC=k1-mbr-gcc -K1C_CFLAGS=-Wall -O3 -std=c99 -K1C_CCOMP=../../../ccomp -K1C_CCOMPFLAGS=-Wall -O3 +include ../rules.mk all: check -%.gcc.k1c.s: %.c - $(K1C_CC) $(K1C_CFLAGS) -S $< -o $@ - -%.gcc.k1c.o: %.gcc.k1c.s - $(K1C_CC) $(K1C_CFLAGS) -c $< -o $@ - -%.ccomp.k1c.s: %.c - $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -S $< -o $@ - -%.ccomp.k1c.o: %.ccomp.k1c.s - $(K1C_CCOMP) $(K1C_CCOMPFLAGS) -c $< -o $@ - -%.gcc.host.o: %.c - $(CC) $(CFLAGS) -c $< -o $@ all: compress.gcc.host compress.ccomp.host compress.gcc.k1c compress.ccomp.k1c -- cgit From 2d9ef79ffd1903a444bb33dfdd91bf4d2542c12e Mon Sep 17 00:00:00 2001 From: Cyril SIX Date: Fri, 22 Nov 2019 16:36:29 +0100 Subject: benches += ncompress --- test/monniaux/ncompress/Makefile | 54 +++------------------------------------- 1 file changed, 3 insertions(+), 51 deletions(-) (limited to 'test/monniaux/ncompress/Makefile') diff --git a/test/monniaux/ncompress/Makefile b/test/monniaux/ncompress/Makefile index cf543976..14a99d0b 100644 --- a/test/monniaux/ncompress/Makefile +++ b/test/monniaux/ncompress/Makefile @@ -1,52 +1,4 @@ -include ../rules.mk - -all: check - - -all: compress.gcc.host compress.ccomp.host compress.gcc.k1c compress.ccomp.k1c - -compress.gcc.host : compress42.c ../clock.gcc.host.o - $(CC) $(CFLAGS) $+ -o $@ - -compress.ccomp.host : compress42.c ../clock.gcc.host.o - $(CCOMP) $(CCOMPFLAGS) $+ -o $@ - -compress.gcc.k1c : compress42.gcc.k1c.o ../clock.gcc.k1c.o - $(K1C_CC) $(K1C_CFLAGS) $+ -o $@ - -compress.ccomp.k1c : compress42.ccomp.k1c.o ../clock.gcc.k1c.o - $(K1C_CCOMP) $(K1C_CCOMPFLAGS) $+ -o $@ - -INFILE=Makefile -COMPRESSED=foo.gcc.host.Z - -foo.gcc.host.Z: compress.gcc.host $(INFILE) - ./compress.gcc.host <$(INFILE) >foo.gcc.host.Z 2> foo.gcc.host.Z.out +TARGET=compress +EXECUTE_ARGS= < Makefile > __BASE__.Z 2> __BASE__.out -foo.ccomp.k1c.Z: compress.ccomp.k1c $(INFILE) - $(EXECUTE) ./compress.ccomp.k1c <$(INFILE) >foo.ccomp.k1c.Z 2> foo.ccomp.k1c.Z.out - -foo.gcc.k1c.Z: compress.gcc.k1c $(INFILE) - $(EXECUTE) ./compress.gcc.k1c <$(INFILE) >foo.gcc.k1c.Z 2> foo.gcc.k1c.Z.out - -foo.gcc.host.txt: compress.gcc.host $(COMPRESSED) - ./compress.gcc.host -d <$(COMPRESSED) >foo.gcc.host.txt 2> foo.gcc.host.txt.out - -foo.ccomp.k1c.txt: compress.gcc.host $(COMPRESSED) - $(EXECUTE) ./compress.ccomp.k1c -d <$(COMPRESSED) >foo.ccomp.k1c.txt 2> foo.ccomp.k1c.txt.out - -foo.gcc.k1c.txt: compress.gcc.host $(COMPRESSED) - $(EXECUTE) ./compress.gcc.k1c -d <$(COMPRESSED) >foo.gcc.k1c.txt 2> foo.gcc.k1c.txt.out - -check: foo.gcc.host.Z foo.gcc.host.txt foo.ccomp.k1c.Z foo.ccomp.k1c.txt foo.gcc.k1c.Z foo.gcc.k1c.txt - cmp foo.gcc.host.Z foo.ccomp.k1c.Z - cmp foo.gcc.host.Z foo.gcc.k1c.Z - cmp foo.gcc.host.txt foo.ccomp.k1c.txt - cmp foo.gcc.host.txt foo.gcc.k1c.txt - -clean: - rm -f *.Z *.txt *.out *.o *.s *.host *.k1c - -.PHONY: clean - -.SECONDARY: %.s +include ../rules.mk -- cgit