forked from SimonCahill/isotp-c
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.mk
63 lines (58 loc) · 1.23 KB
/
vars.mk
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
59
60
61
62
63
###
# CROSS variable
# Use for cross-compilation.
# Uncommenting and setting this variable to the prefix of
# your cross compiler will allow you to cross compile this library.
###
#CROSS=powerpc-linux-gnu
###
# LANG variable
# Set this value according to the language
# you wish to compile against.
# Possible (legal) values:
# - C [c]
# - C++ [c++]
###
LANG := "C++"
###
# STD variables.
# Do NOT set the STD variable.
# Instead, set the C/C++ STD variables
# according to the standard you wish to use.
###
CSTD := "gnu99"
CPPSTD := "c++0x"
###
# OUTPUT_NAME variable.
# This variable contains the name of the output file (the .so).
###
LIB_NAME := "libisotp.so"
MAJOR_VER := "1"
MINOR_VER := "1"
REVISION := "1"
OUTPUT_NAME := $(LIB_NAME).$(MAJOR_VER).$(MINOR_VER).$(REVISION)
###
# INSTALL_DIR variable.
# Set this variable to the location where the lib should be installed.
###
INSTALL_DIR := /usr/lib
###
# Compute compiler and language standard to use
# This section determines which compiler to use.
###
ifeq ($(LANG), "C++")
STD := "-std=$(CPPSTD)"
ifeq ($(strip $(CROSS)),)
COMP := g++
else
COMP := $(CROSS)g++
endif
endif
ifeq ($(LANG), "C")
STD := "-std=$(CSTD)"
ifeq ($(strip $(CROSS)),)
COMP := gcc
else
COMP := $(CROSS)gcc
endif
endif