You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
415 B

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