﻿CC = gcc
ALLEGROLIBS = `allegro-config --cflags`
CFLAGS = -pg -I/usr/include -I./inc -Wall $(ALLEGROLIBS)
OBJ = main.o
V = 0.8

#THE game
life: $(OBJ)
	$(CC) $(CFLAGS) -o pong-$V $(OBJ) `allegro-config --libs`

#object files
main.o: src/main.c inc/*.h
	$(CC) $(CFLAGS) -c -o main.o src/main.c

#utilities
#clean: clear object files and backup files
clean:
	rm *.o *~ 2> /dev/null
#clear: clear all the compilation
clear: clean
	rm life 2> /dev/null

#edit: edit files via gedit
edit:
	gedit Makefile */*.[ch]

#tar
#create tarball
tar:
	tar -czvf pong-$V.tar.gz src/*.c inc/*.h Makefile
