31 lines
557 B
Makefile
31 lines
557 B
Makefile
#-*- Makefile -*-
|
|
|
|
OBJS = main.o player.o dt.o block.o entity.o
|
|
|
|
CC = g++
|
|
|
|
COMPILER_FLAGS = -w
|
|
|
|
LINKER_FLAGS = -lSDL2 -std=gnu++11
|
|
|
|
OBJ_NAME = bin/main
|
|
|
|
|
|
all: $(OBJS)
|
|
$(CC) $(OBJS) $(COMPLER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME)
|
|
|
|
main.o: main.cpp
|
|
$(CC) -c main.cpp $(LINKER_FLAGS)
|
|
|
|
player.o: player.cpp player.h entity.h
|
|
$(CC) -c player.cpp -lm $(LINKER_FLAGS)
|
|
|
|
dt.o: dt.cpp dt.h
|
|
$(CC) -c dt.cpp $(LINKER_FLAGS)
|
|
|
|
block.o: block.cpp block.h entity.h
|
|
$(CC) -c block.cpp $(LINKER_FLAGS)
|
|
|
|
entity.o: entity.cpp entity.h
|
|
$(CC) -c entity.cpp $(LINKER_FLAGS)
|