Created
February 24, 2015 09:58
-
-
Save makenowjust/b1682fafb1e8380d8adb to your computer and use it in GitHub Desktop.
a Makefile of asrun (AngelScript) for Linux (gnuc), it's a public domain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CXX = g++ | |
CXXFLAGS = -std=c++11 -ggdb -I../../../../angelscript/include -D_LINUX_ | |
SRCDIR = ../../source | |
OBJDIR = obj | |
SRCNAMES = \ | |
main.cpp | |
OBJ = $(addprefix $(OBJDIR)/, $(notdir $(SRCNAMES:.cpp=.o))) \ | |
obj/scriptstdstring.o obj/scriptstdstring_utils.o \ | |
obj/scripthelper.o obj/contextmgr.o \ | |
obj/scriptarray.o obj/scriptdictionary.o \ | |
obj/scriptfile.o obj/scriptfilesystem.o \ | |
obj/scriptbuilder.o obj/debugger.o | |
BIN = ../../bin/asrun | |
DELETER = rm -f | |
all: $(BIN) | |
$(BIN): $(OBJ) | |
$(CXX) -o $(BIN) $(OBJ) -langelscript -pthread -L ../../../../angelscript/lib | |
@echo ------------------------------------------------------------------- | |
@echo Done. | |
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptstdstring.o: ../../../../add_on/scriptstdstring/scriptstdstring.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptstdstring_utils.o: ../../../../add_on/scriptstdstring/scriptstdstring_utils.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scripthelper.o: ../../../../add_on/scripthelper/scripthelper.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/contextmgr.o: ../../../../add_on/contextmgr/contextmgr.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptarray.o: ../../../../add_on/scriptarray/scriptarray.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptdictionary.o: ../../../../add_on/scriptdictionary/scriptdictionary.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptfile.o: ../../../../add_on/scriptfile/scriptfile.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptfilesystem.o: ../../../../add_on/scriptfile/scriptfilesystem.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/scriptbuilder.o: ../../../../add_on/scriptbuilder/scriptbuilder.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
obj/debugger.o: ../../../../add_on/debugger/debugger.cpp | |
$(CXX) $(CXXFLAGS) -o $@ -c $< | |
clean: | |
$(DELETER) $(OBJ) $(BIN) | |
.PHONY: all clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment