47 lines
1.0 KiB
Makefile
47 lines
1.0 KiB
Makefile
|
# 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
|