Ajout des cibles all, clean, mrproper et test.
This commit is contained in:
parent
a65fe34b4c
commit
e7ef08aff0
16
Makefile
16
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user