2016-04-04 07:36:04 +00:00
|
|
|
TARGET := spirv-cross
|
2016-03-02 17:09:16 +00:00
|
|
|
SOURCES := $(wildcard *.cpp)
|
|
|
|
OBJECTS := $(SOURCES:.cpp=.o)
|
|
|
|
DEPS := $(OBJECTS:.o=.d)
|
|
|
|
|
|
|
|
CXXFLAGS += -std=c++11 -Wall -Wextra
|
|
|
|
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
CXXFLAGS += -O0 -gdwarf-2
|
|
|
|
else
|
|
|
|
CXXFLAGS += -O2 -gdwarf-2
|
|
|
|
endif
|
|
|
|
|
|
|
|
all: $(TARGET)
|
|
|
|
|
|
|
|
-include $(DEPS)
|
|
|
|
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
|
|
|
|
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS) -MMD
|
|
|
|
|
|
|
|
clean:
|
2016-04-04 07:36:04 +00:00
|
|
|
rm -f $(TARGET) $(OBJECTS) $(DEPS)
|
2016-03-02 17:09:16 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|