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

init

parents
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
CC := gcc
# La variable CFLAGS contient les flags de compilation :
CFLAGS := -g -Wall -Wextra -pedantic -fsanitize=address
# La variable LDFLAGS contient les flags pour l' éditeur
# de liens :
LDFLAGS := -lm -lSDL2 -fsanitize=address
# Définition des sources
SOURCES := main.c tree/quadtree.c matrix/matrix.c pgm/pgm.c
# OBJECTS contient SOURCES avec .c qui devient .o
OBJECTS := $(SOURCES:.c=.o)
# galaxy sera l' exécutable ( galaxy .c contient le main)
TARGET := main
# Jusqu 'ici on a aucune cible
default:
@echo "Available targets :"
@echo "bigfile generates a 10 MB file of random data from / dev / urandom"
@echo "copybench generates the copybench executable ( dynamically linked )"
@echo "copybench_static generates the copybench_static executable ( statically linked )"
@echo "run executes copybench and copybench_static"
@echo "clean deletes all generated files ( including bigfile )"
run: bigfile, copybench, copybench_static
copybench:
bash copybench.sh
copybench_static:
bigfile:
dd if=/dev/urandom of=bigfile bs=10k count=1000
# 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
# exécute toujours clean , même si un ficher `clean ` existe
.PHONY: clean
clean: # aucune dépendance
rm -f *.o copybench *.so *.a bigfile
\ No newline at end of file
copy.c 0 → 100644
#include "copy.h"
\ No newline at end of file
copy.h 0 → 100644
#ifndef _COPYF_H_
#define _COPYF_H_
#endif
#!/bin/bash
export LD_CONFIG_PATH=$LD_CONFIG_PATH:$(pwd)
#include "copy.h"
\ No newline at end of file
main.c 0 → 100644
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment