40 lines
800 B
Makefile
40 lines
800 B
Makefile
#-*- Makefile -*-
|
|
|
|
OBJS = main.o player.o dt.o block.o entity.o camera.o texture.o powerup.o
|
|
|
|
CC = g++
|
|
|
|
COMPILER_FLAGS = -w
|
|
|
|
LINKER_FLAGS = -lSDL2_image -lSDL2 -std=gnu++11
|
|
|
|
OBJ_NAME = 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.o texture.o
|
|
$(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.o
|
|
$(CC) -c block.cpp $(LINKER_FLAGS)
|
|
|
|
entity.o: entity.cpp entity.h
|
|
$(CC) -c entity.cpp $(LINKER_FLAGS)
|
|
|
|
camera.o: camera.cpp camera.h
|
|
$(CC) -c camera.cpp
|
|
|
|
texture.o: texture.cpp texture.h
|
|
$(CC) -c -lSDL2_image texture.cpp
|
|
|
|
powerup.o: powerup.cpp powerup.h
|
|
$(CC) -c powerup.cpp $(LINKER_FLAGS)
|