File: CommonCSMakefile

package info (click to toggle)
openni2 2.2.0.33%2Bdfsg-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 22,216 kB
  • sloc: cpp: 111,197; ansic: 35,511; sh: 10,542; python: 1,313; java: 952; makefile: 575; xml: 12
file content (58 lines) | stat: -rw-r--r-- 1,909 bytes parent folder | download | duplicates (18)
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
49
50
51
52
53
54
55
56
57
58
#############################################################################
# Primesense template makefile.
# This file should not be made, but only included from other makefiles.
# By default, this makefile compiles in release. To compile a debug version:
#    make CFG=Debug
#
# Project makefile should define the following BEFORE including this file:
# SRC_FILES - a list of all source files
# Output name under one of the following:
#     NETLIB_NAME (.net module) or
#     NETEXE_NAME (.net executable)
# BIN_DIR - Bin directory (output dir)
# INC_DIRS - a list of additional include directories
# USED_LIBS - a list of libraries to link with
# CSFLAGS - [Optional] additional flags for mono compiler
# NET_WIN_FORMS - [Optional] when 1, application uses WinForms
#############################################################################

# take this file's dir
COMMON_CS_MAKE_FILE_DIR = $(dir $(lastword $(MAKEFILE_LIST)))

include $(COMMON_CS_MAKE_FILE_DIR)CommonDefs.mak

# create -r option to mcs
USED_NETLIBS_OPTION = $(foreach lib,$(USED_LIBS),-r:$(lib).dll)

ifeq "$(NET_WIN_FORMS)" "1"
	USED_NETLIBS_OPTION += -r:System.Windows.Forms.dll -r:System.Drawing.dll
endif

# add the output dir as a place to search for assemblies
USED_NETLIBS_OPTION += -lib:$(OUT_DIR)

ifeq "$(CFG)" "Release"
	CSFLAGS += -o+
endif

# some lib / exe specifics
ifneq "$(NETLIB_NAME)" ""
	OUTPUT_NAME = $(NETLIB_NAME).dll
	TARGET = library
endif
ifneq "$(NETEXE_NAME)" ""
	OUTPUT_NAME = $(NETEXE_NAME).exe
	TARGET = winexe
endif

OUTPUT_COMMAND = gmcs -out:$(OUTPUT_FILE) -target:$(TARGET) $(CSFLAGS) $(USED_NETLIBS_OPTION) $(SRC_FILES)

#############################################################################
# Targets
#############################################################################
include $(COMMON_CS_MAKE_FILE_DIR)CommonTargets.mak

# Final output file
$(OUTPUT_FILE): 
	$(OUTPUT_COMMAND)