summaryrefslogtreecommitdiff
path: root/tct-system-settings-tizen-tests/Makefile
blob: 8f7b62ded30933ee4f00e6b7c793d7defbae216e (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

ifndef config
	config=debug
endif

ifndef verbose
	SILENT = @
endif

PROJECTS := tct-system-settings-tizen-tests

CSC = mcs

.PHONY: all clean help $(PROJECTS) prebuild prelink

ifeq ($(config),debug)
	FLAGS = /debug /noconfig /d:DEBUG
endif

ifeq ($(config),release)
	FLAGS = /optimize /noconfig /d:NDEBUG
endif

FLAGS += /t:exe

TARGETDIR = bin
OBJDIR = obj
TARGET = $(TARGETDIR)/$(PROJECTS).exe
SOURCES = $(wildcard src/**/*.cs src/*.cs)
null :=
space := $(null) #
comma := ,
DLLS = $(wildcard lib/*.dll)
ifneq ("$(DLLS)", "")
	REFERENCE = "/reference:$(subst $(space),$(comma),$(DLLS))"
endif

all: $(TARGETDIR) $(TARGET)

$(TARGET): $(SOURCES) $(DLLS)
	@echo "=== Building $(PROJECTS) ($(config))"
	$(SILENT) $(CSC) /nologo /out:$@ $(REFERENCE) $(FLAGS) $(SOURCES) 

$(TARGETDIR):
	$(SILENT) mkdir -p $(TARGETDIR)

clean:
	$(SILENT) rm -rf $(TARGETDIR)