Skip to content
Snippets Groups Projects
Commit 58a24e4e authored by leo.muff's avatar leo.muff
Browse files

makefile a tester

parent 59056741
Branches
No related tags found
No related merge requests found
......@@ -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,12 +23,29 @@ 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
copybench_static:
copy.o: copy.h
gcc -fPIC -c copy.c copyf.c
copybench.o:
gcc -c $(PATH) copybench.c
copybench_static.o:
gcc -c $(PATH) copybench_static.c
bigfile:
dd if=/dev/urandom of=bigfile bs=10k count=1000
......@@ -36,6 +54,7 @@ bigfile:
# PHONY signifie qu 'on ne crée rien avec les cibles
# mentionnées . Ici clean est la cible utilisée pour
# enlever tous les fichier .o et l' exécutable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment