summaryrefslogtreecommitdiff
path: root/Makefile
blob: 49a6f812d3de9ce18d1c5a9704e42566b0506baf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
RB_LIBS_DIR=	./src/include/
BUILD_DIR=	./build/
BIN_DIR=	./bin

ALLEGRO_LIBS=	-lallegro_font \
		-lallegro_primitives \
		-lallegro

INCLUDES=	-I$(RB_LIBS_DIR)

OBJS=	./build/*.o

all: $(BUILD_DIR)/rb.o
	gcc -Wall $(INCLUDES) -lm $(OBJS) $(ALLEGRO_LIBS) -o $(BIN_DIR)/rocksblaster

$(BUILD_DIR)/rb.o: $(BUILD_DIR)/spaceship.o src/rb.c
	gcc -Wall $(INCLUDES) -c src/rb.c -o $(BUILD_DIR)/rb.o

$(BUILD_DIR)/spaceship.o: src/spaceship.c
	gcc -Wall $(INCLUDES) -c src/spaceship.c -o $(BUILD_DIR)/spaceship.o

clean:
	rm -f $(BUILD_DIR)/*.o
	rm -f $(BIN_DIR)/rocksblaster