Meilleurs Makefile

This commit is contained in:
Geoffrey Frogeye 2016-03-02 08:50:03 +01:00
parent 630cfed0ed
commit c7cd6f5092
6 changed files with 22 additions and 4 deletions

View file

@ -1,4 +1,4 @@
all: $(subst c,exe,$(shell ls *.c))
all: $(patsubst %.c,%.exe,$(shell ls *.c))
%.exe: %.c
gcc $< -o $@ -lm

9
Exos/Makefile Normal file
View file

@ -0,0 +1,9 @@
all: $(patsubst %.c,%.exe,$(shell ls *.c))
%.exe: %.c
gcc $< -o $@
.PHONY: all clean
clean:
rm *.exe

View file

@ -1,4 +1,4 @@
all: $(subst c,exe,$(shell ls *.c))
all: $(patsubst %.c,%.exe,$(shell ls *.c))
%.exe: %.c
gcc $< -o $@

View file

@ -1,4 +1,4 @@
all: $(subst c,exe,$(shell ls *.c))
all: $(patsubst %.c,%.exe,$(shell ls *.c))
E1-1.exe: E1-1.c
gcc E1-1.c -o E1-1.exe

View file

@ -1,4 +1,4 @@
all: $(subst c,exe,$(shell ls *.c))
all: $(patsubst %.c,%.exe,$(shell ls *.c))
E1-1.exe: E1-1.c
gcc E1-1.c -o E1-1.exe

9
TP3/Makefile Normal file
View file

@ -0,0 +1,9 @@
all: $(patsubst %.c,%.exe,$(shell ls *.c))
%.exe: %.c
gcc $< -o $@
.PHONY: all clean
clean:
rm *.exe