SPIRV-Cross-Vulnerable/Makefile

45 lines
908 B
Makefile
Raw Permalink Normal View History

2021-05-08 08:24:34 +00:00
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
TARGET := spirv-cross
SOURCES := $(wildcard spirv_*.cpp)
CLI_SOURCES := main.cpp
2016-03-02 17:09:16 +00:00
OBJECTS := $(SOURCES:.cpp=.o)
CLI_OBJECTS := $(CLI_SOURCES:.cpp=.o)
STATIC_LIB := lib$(TARGET).a
DEPS := $(OBJECTS:.o=.d) $(CLI_OBJECTS:.o=.d)
2016-03-02 17:09:16 +00:00
CXXFLAGS += -std=c++11 -Wall -Wextra -Wshadow -Wno-deprecated-declarations
2016-03-02 17:09:16 +00:00
ifeq ($(DEBUG), 1)
CXXFLAGS += -O0 -g
2016-03-02 17:09:16 +00:00
else
CXXFLAGS += -O2 -DNDEBUG
2016-03-02 17:09:16 +00:00
endif
2016-12-15 19:46:10 +00:00
ifeq ($(SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS), 1)
CXXFLAGS += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS -fno-exceptions
endif
2016-03-02 17:09:16 +00:00
all: $(TARGET)
-include $(DEPS)
$(TARGET): $(CLI_OBJECTS) $(STATIC_LIB)
$(CXX) -o $@ $(CLI_OBJECTS) $(STATIC_LIB) $(LDFLAGS)
$(STATIC_LIB): $(OBJECTS)
$(AR) rcs $@ $(OBJECTS)
2016-03-02 17:09:16 +00:00
%.o: %.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS) -MMD
clean:
rm -f $(TARGET) $(OBJECTS) $(CLI_OBJECTS) $(STATIC_LIB) $(DEPS)
2016-03-02 17:09:16 +00:00
.PHONY: clean