From e7ef08aff0675170e35889209d407ef3d1dcb9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georges=20Dup=C3=A9ron?= Date: Sun, 26 Sep 2010 00:57:57 +0200 Subject: [PATCH] Ajout des cibles all, clean, mrproper et test. --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 09234f3..fedcd86 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,29 @@ CFLAGS= LD=gcc LDFLAGS=-lSDL # -lSDL_mixer +RM=rm EXEC=lew SOURCES=main.c OBJECTS=$(SOURCES:.c=.o) +.Phony: all +all: $(EXEC) + $(EXEC): $(OBJECTS) $(LD) $(LDFLAGS) $< -o $@ .o: $(CC) $(CFLAGS) $< -o $@ + +.Phony: clean +clean: + $(RM) $(OBJECTS) + +.Phony: mrproper +mrproper: clean + $(RM) $(EXEC) + +.Phony: test +test: $(EXEC) + @./$(EXEC) || true