Created
December 30, 2011 13:55
-
-
Save dai1741/1539958 to your computer and use it in GitHub Desktop.
Eclipse CDTで競技プログラミングのコードを1プロジェクト内にまとめたうえで個別に実行できるようにするGNU Makefile
This file contains 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
# ファイル構成: | |
# root | |
# |- src :*.cppが入っている | |
# |- bin :ここに*.exeが生成される | |
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 | |
CPPS = $(wildcard src/*.cpp) | |
OBJS = $(CPPS:.cpp=.o) | |
LIBS = | |
TARGET = $(CPPS:src/%.cpp=bin/%.exe) | |
#$(TARGET): $(OBJS) | |
# $(CXX) -g -o $(TARGET) $(OBJS) $(LIBS) | |
bin/%.exe : src/%.o | |
$(CXX) -g -o "$@" $< $(LIBS) | |
all: $(TARGET) | |
clean: | |
rm -f $(OBJS) $(wildcard bin/*.exe) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment