Angelscript/samples/console/projects/mingw/makefile

47 lines
1.0 KiB
Makefile
Raw Normal View History

2021-04-12 18:25:02 +00:00
# Console MingW makefile
CXX = g++
CXXFLAGS ?= -ggdb
CXXFLAGS += -I../../../../angelscript/include
SRCDIR = ../../source
OBJDIR = obj
SRCNAMES = \
main.cpp \
OBJ = $(addprefix $(OBJDIR)/, $(notdir $(SRCNAMES:.cpp=.o))) \
obj/scriptarray.o \
obj/scripthelper.o \
obj/scriptstdstring.o
BIN = ../../bin/console.exe
OBJ_D = $(subst /,\,$(OBJ))
BIN_D = $(subst /,\,$(BIN))
DELETER = del /f
all: $(BIN)
$(BIN): $(OBJ)
$(CXX) -o $(BIN) $(OBJ) $(CXXFLAGS) -langelscript -L ../../../../angelscript/lib
@echo -------------------------------------------------------------------
@echo Done.
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
obj/scriptarray.o: ../../../../add_on/scriptarray/scriptarray.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
obj/scripthelper.o: ../../../../add_on/scripthelper/scripthelper.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
obj/scriptstdstring.o: ../../../../add_on/scriptstdstring/scriptstdstring.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
clean:
$(DELETER) $(OBJ_D) $(BIN_D)
.PHONY: all clean