From 94c6c75abf8f338b5e803353eec441c53dbe1085 Mon Sep 17 00:00:00 2001 From: pumnflqv2 Date: Tue, 5 Jul 2022 04:54:25 +0800 Subject: [PATCH] ADD file via upload --- b/2/Makefile | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 b/2/Makefile diff --git a/b/2/Makefile b/b/2/Makefile new file mode 100644 index 0000000..9f11cb3 --- /dev/null +++ b/b/2/Makefile @@ -0,0 +1,27 @@ +FILES =mmap munmap clone + +INC =-nostdinc -I./include + +.PHONY: all test clean +all: echo + for i in $(FILES); \ + do \ + (gcc $(INC) $$i.c -o $$i); \ + done + +${FILES}: echo + gcc $(INC) $@.c -o $@ + +echo: echo.c + gcc $(INC) $@.c -o $@ + +test: echo + @for i in $(FILES); \ + do \ + (echo "--------------testing " $$i":"); \ + (./$$i); \ + done + +clean: + -(rm ${FILES}; \ + rm *.o a.out *.log echo test_mmap.txt) > /dev/null 2>&1