diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..48244d6 --- /dev/null +++ b/Makefile @@ -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)/*~ diff --git a/build b/build new file mode 100755 index 0000000..3aec546 --- /dev/null +++ b/build @@ -0,0 +1,2 @@ +#!/bin/sh +make && bin/superderpy diff --git a/make b/make deleted file mode 100755 index 8eb036d..0000000 --- a/make +++ /dev/null @@ -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 diff --git a/obj/.gitignore b/obj/.gitignore new file mode 100644 index 0000000..5761abc --- /dev/null +++ b/obj/.gitignore @@ -0,0 +1 @@ +*.o