mirror of
https://github.com/pret/pmd-sky.git
synced 2026-04-25 07:24:42 -05:00
30 lines
513 B
Makefile
30 lines
513 B
Makefile
CXX := g++
|
|
CXXFLAGS := -O3 -std=c++11
|
|
|
|
CXXSRCS := o2narc.cpp Options.cpp RelocElfReader.cpp
|
|
CXXOBJS := $(CXXSRCS:%.cpp=%.o)
|
|
|
|
.PHONY: all clean
|
|
|
|
all: o2narc
|
|
@:
|
|
|
|
o2narc: $(CXXOBJS)
|
|
$(CXX) $(LDFLAGS) -o $@ $^
|
|
|
|
DEPDIR := .deps
|
|
DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
|
|
$(DEPDIR): ; @mkdir -p $@
|
|
|
|
%.o: %.cpp
|
|
%.o: %.cpp $(DEPDIR)/%.d | $(DEPDIR)
|
|
$(CXX) $(CXXFLAGS) $(DEPFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
$(RM) o2narc o2narc.exe
|
|
|
|
DEPFILES := $(CXXSRCS:%.cpp=$(DEPDIR)/%.d)
|
|
$(DEPFILES):
|
|
|
|
include $(wildcard $(DEPFILES))
|