Makefile 980 Bytes
Newer Older
pcy's avatar
initial  
pcy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

default: all

CSC ?= mcs # use csc here if you're on windows
MONO ?= mono # leave this empty on windows

CSFLAGS := -checked- -unsafe+
CSFLAGS += -lib:lib/ -r:FNA.dll

SOURCES := $(wildcard src/*.cs)

TARGET := bin/fnaglsl.exe

LIBS := lib/FNA.dll lib/FNA.dll.config lib/libmojoshader.so

16
$(TARGET): bin/ $(SOURCES) #$(LIBS)
pcy's avatar
initial  
pcy committed
17
18
19
20
21
22
	$(CSC) $(CSFLAGS) -target:exe -out:"$@" $(SOURCES)

all: $(TARGET)

$(LIBS): lib/
	@>&2 echo "You need to put FNA.dll{,.config} and libmojoshader.so in the" \
23
        "\`lib/' directory."; false
pcy's avatar
initial  
pcy committed
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

debug: CSFLAGS += -debug+
debug: all

release: CSFLAGS += -optimize+
release: all

t: debug
	TERM=xterm MONO_PATH="$$PWD/lib/:$$MONO_PATH" \
        LD_LIBRARY_PATH="$$PWD/lib:$$LD_LIBRARY_PATH" \
        FNA_KEYBOARD_USE_SCANCODES=1 FNA_OPENGL_DISABLE_LATESWAPTEAR=1 \
        FNA_OPENGL_FORCE_CORE_PROFILE=1 \
        $(MONO) --debug=mdb-optimizations "$(TARGET)"

clean:
	@$(RM) -v bin/*

%/:
	@mkdir -vp "$@"

.PHONY: default all debug release t clean