forked from samhocevar/d3d4linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (22 loc) · 801 Bytes
/
Makefile
File metadata and controls
32 lines (22 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
BINARIES = compile-hlsl d3d4linux.exe
INCLUDE = include/d3d4linux.h \
include/d3d4linux_common.h \
include/d3d4linux_enums.h \
include/d3d4linux_impl.h \
include/d3d4linux_types.h
CXXFLAGS += -Wall -I./include -std=c++11
ifeq ($(OS), Windows_NT)
CXX := x86_64-w64-mingw32-c++
LDFLAGS = -s -static-libgcc -static-libstdc++ -ldxguid -static -ld3dcompiler -static -lpthread
else
LDFLAGS = -g
endif
all: $(BINARIES)
d3d4linux.exe: d3d4linux.cpp $(INCLUDE) Makefile
x86_64-w64-mingw32-c++ $(CXXFLAGS) $(filter %.cpp, $^) -static -o $@ -ldxguid
compile-hlsl: compile-hlsl.cpp $(INCLUDE) Makefile
$(CXX) $(CXXFLAGS) $(filter %.cpp, $^) -o $@ $(LDFLAGS)
check: all
D3D4LINUX_VERBOSE=1 ./compile-hlsl sample_ps.hlsl ps_main ps_4_0
clean:
rm -f $(BINARIES)