From 58a24e4eee7fcb756311f3fd67e36b33d4cde204 Mon Sep 17 00:00:00 2001 From: "leo.muff" <leomuffmail@gmail.com> Date: Thu, 8 Jun 2023 11:23:19 +0200 Subject: [PATCH] makefile a tester --- Makefile | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4af916f..32732b5 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,8 @@ SOURCES := main.c tree/quadtree.c matrix/matrix.c pgm/pgm.c OBJECTS := $(SOURCES:.c=.o) # galaxy sera l' exécutable ( galaxy .c contient le main) TARGET := main -# Jusqu 'ici on a aucune cible + +PATH := -I/home/mezmer/gitlab/appels_systeme default: @echo "Available targets :" @@ -22,15 +23,33 @@ default: @echo "run executes copybench and copybench_static" @echo "clean deletes all generated files ( including bigfile )" -run: bigfile, copybench, copybench_static +run: bigfile, copybench, copybench_static, copybench.o, copybench_static.o + gcc -o copybench copybench.o + gcc -o copybench_static copybench_static.o -copybench: +copybench: copy.o libcopy.so.1.0.0 bash copybench.sh + ln -s libcopy.so.1.0.0 libcopy.so.1 + ln -s libcopy.so.1.0.0 libcopy.so + +copybench_static: copy.o + ar rcs -o libcopy.a copy.o + +libcopy.so.1.0.0: copy.o + gcc -shared -W1,-soname,libcopy.so.1 copy.o -o libcopy.so.1.0.0 + +copy.o: copy.h + gcc -fPIC -c copy.c copyf.c + +copybench.o: + gcc -c $(PATH) copybench.c -copybench_static: +copybench_static.o: + gcc -c $(PATH) copybench_static.c bigfile: dd if=/dev/urandom of=bigfile bs=10k count=1000 + -- GitLab