mirror of
https://github.com/KhronosGroup/SPIRV-Cross.git
synced 2024-11-09 22:00:05 +00:00
45ad58a903
In some cases we need to bitcast when dealing with int vs. uint. SPIR-V allows inputs to be of different integer signedness, so we need to deal with this somehow. Add testing system to test SPIR-V assembly. For now, test all possible combination for all major cases. - IAdd (which doesn't care about input type as long as they're equal) - SDiv/UDiv operations which case about input type. - Arith/Logical right shifts. - IEqual to test outputs to bvec, which shouldn't get output cast. Also tests casting in function-like calls.
38 lines
664 B
Makefile
38 lines
664 B
Makefile
TARGET := spirv-cross
|
|
|
|
SOURCES := $(wildcard spirv_*.cpp)
|
|
CLI_SOURCES := main.cpp
|
|
|
|
OBJECTS := $(SOURCES:.cpp=.o)
|
|
CLI_OBJECTS := $(CLI_SOURCES:.cpp=.o)
|
|
|
|
STATIC_LIB := lib$(TARGET).a
|
|
|
|
DEPS := $(OBJECTS:.o=.d) $(CLI_OBJECTS:.o=.d)
|
|
|
|
CXXFLAGS += -std=c++11 -Wall -Wextra -Wshadow
|
|
|
|
ifeq ($(DEBUG), 1)
|
|
CXXFLAGS += -O0 -g
|
|
else
|
|
CXXFLAGS += -O2 -g
|
|
endif
|
|
|
|
all: $(TARGET)
|
|
|
|
-include $(DEPS)
|
|
|
|
$(TARGET): $(CLI_OBJECTS) $(STATIC_LIB)
|
|
$(CXX) -o $@ $(CLI_OBJECTS) $(STATIC_LIB) $(LDFLAGS)
|
|
|
|
$(STATIC_LIB): $(OBJECTS)
|
|
$(AR) rcs $@ $(OBJECTS)
|
|
|
|
%.o: %.cpp
|
|
$(CXX) -c -o $@ $< $(CXXFLAGS) -MMD
|
|
|
|
clean:
|
|
rm -f $(TARGET) $(OBJECTS) $(CLI_OBJECTS) $(STATIC_LIB) $(DEPS)
|
|
|
|
.PHONY: clean
|