30 lines
945 B
Makefile
30 lines
945 B
Makefile
|
|
ENGINE_DIR = ../..
|
|
TARGET := $(ENGINE_DIR)/assets/StarFleet.exe
|
|
LIBS_DIR = ../../../../../libs
|
|
all: $(TARGET)
|
|
|
|
INCLUDES = -I. -I$(LIBS_DIR)/gl/glm/glm -I$(LIBS_DIR)/gl/glew-2.0.0/include -I$(LIBS_DIR)/gl/glfw-3.3.bin.WIN32/include -I$(ENGINE_DIR)/src
|
|
CPPFLAGS = -Wall -ggdb -m32
|
|
LDFLAGS = -static-libgcc -static-libstdc++ -ggdb -m32
|
|
LIBS = -lnenuzhno-engine -lglfw3 -lglew32 -lopengl32 -lgdi32 -L$(ENGINE_DIR)/bin -L$(LIBS_DIR)/gl/glfw-3.3.bin.WIN32/lib-mingw-w64 -L$(LIBS_DIR)/gl/glew-2.0.0/lib
|
|
SRCS = star-fleet.cpp input.cpp Ship.cpp Explosion.cpp Projectile.cpp
|
|
OBJS = $(patsubst %.cpp,obj/%.o,$(SRCS))
|
|
|
|
obj/%.o: %.cpp
|
|
$(CXX) -c $< -o $@ $(CPPFLAGS) $(INCLUDES)
|
|
|
|
$(TARGET): $(OBJS) $(ENGINE_DIR)/bin/libnenuzhno-engine.a
|
|
$(CXX) -o $@ $(OBJS) $(LDFLAGS) $(LIBS)
|
|
|
|
clean:
|
|
$(RM) $(OBJS) $(TARGET)
|
|
|
|
rebuild: clean all
|
|
|
|
obj/star-fleet.o: entity.h
|
|
obj/input.o: entity.h
|
|
obj/Ship.o: entity.h
|
|
obj/Explosion.o: entity.h
|
|
obj/Projectile.o: entity.h
|