#To be de-comment if use of the Makefile alone
#CC = cc
#CFLAGS = -g -Wall -O3 
#LDFLAGS = -lm 

#Runnable and implicit dependance to the .c and .o
EXEC=subdivision
#SRC= $(wildcard *.c)
#OBJ= $(SRC: .c=.o)

#Creation of the runnable
all: $(EXEC)

#$(EXEC): $(OBJ)
#	@$(CC) -o $@ $^ $(LDFLAGS)

#%.o: %.c
#	@$(CC) -o $@ -c $< $(CFLAGS)

$(EXEC): main.o es.o trans.o util.o
	$(CC) $(CFLAGS) main.o es.o trans.o util.o\
	$(LDFLAGS) -o subdivision

main.o: es.h graphic3d.h trans.h util.h


#Clean
.PHONY: clean

clean: 
	@rm -rf *.o $(EXEC)


