Last active
August 29, 2015 14:05
-
-
Save denkiwakame/8a54048a4205b0ee13cc to your computer and use it in GitHub Desktop.
wakame no
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++ -std=c++11 | |
BINDIR=bin | |
SRCDIR=src | |
OBJDIR=obj | |
CXXFLAGS=-O2 -MMD -Wall -Wextra -std=c++11 | |
CXXFLAGS+=`pkg-config --cflags opencv` | |
LDFLAGS=`pkg-config --libs opencv` | |
LDFLAGS+= -lboost_program_options | |
TARGETS=sphere | |
SRCS=$(wildcard $(SRCDIR)/*.cpp) | |
OBJS=$(SRCS:$(SRCDIR)/%.cpp=$(OBJDIR)/%.o) | |
DEPS=$(SRCS:$(SRCDIR)/%.cpp=$(OBJDIR)/%.d) | |
$(BINDIR)/$(TARGETS): $(OBJS) | |
$(CXX) -o $@ $(OBJS) $(CXXFLAGS) $(LDFLAGS) | |
@echo 'Linking Complete.' | |
#$(OBJS):$(OBJDIR)/%.o:$(SRCDIR)/%.cpp | |
$(OBJDIR)/%.o:$(SRCDIR)/%.cpp | |
$(CXX) -c $< $(CXXFLAGS) -o $@ | |
@echo 'Compiled' $< 'Successfully.' | |
@echo $(OBJS) | |
clean: | |
rm -rf $(BINDIR)/$(TARGETS) $(OBJS) $(DEPS) | |
-include $(DEPS) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$(CXX) -c $< $(CXXFLAGS) $(LDFLAGS) -o $@
とかいってて頭おかしかった