add makefile

This commit is contained in:
Sebastian Krzyszkowiak 2012-02-19 21:10:36 +01:00
parent 4a3160b3b8
commit b19476aa44
4 changed files with 24 additions and 2 deletions

21
Makefile Normal file
View file

@ -0,0 +1,21 @@
IDIR =.
CC=gcc
CFLAGS=-I$(IDIR) -std=gnu99 -Wall -DDEBUG -g
SRCDIR=src
ODIR=obj
LIBS=-lallegro -lallegro_audio-debug -lallegro_acodec-debug -lallegro_image-debug -lallegro_font-debug -lallegro_ttf-debug -lm
_OBJ = main.o about.o intro.o loading.o map.o menu.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
$(ODIR)/%.o: $(SRCDIR)/%.c
$(CC) -c -o $@ $< $(CFLAGS)
bin/superderpy: $(OBJ)
gcc -o $@ $^ $(CFLAGS) $(LIBS)
.PHONY: clean
clean:
rm -f $(ODIR)/*.o *~ allegro.log $(SRCDIR)/*~

2
build Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
make && bin/superderpy

2
make
View file

@ -1,2 +0,0 @@
#!/bin/sh
gcc src/loading.c src/main.c src/menu.c src/about.c src/intro.c src/map.c -o bin/superderpy -lallegro -lallegro_audio-debug -lallegro_acodec-debug -lallegro_image-debug -lallegro_font-debug -lallegro_ttf-debug -DDEBUG -std=gnu99 -g -Wall && ./bin/superderpy

1
obj/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.o