-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathstandard_definitions.mk
117 lines (79 loc) · 2.58 KB
/
standard_definitions.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#
#
#
ANITA_LIB_DIR=${ANITA_FLIGHT_SOFT_DIR}/lib
ANITA_BIN_DIR=${ANITA_FLIGHT_SOFT_DIR}/bin
CC = gcc
LD = gcc
ObjSuf = o
SrcSuf = c
ExeSuf =
OPT = -Wall --debug #-DUSE_ZLIB_EVENTS # --debug --pedantic-errors
SOFLAGS = -shared
DllSuf = so
#Hack so that the software compiles on MAC OS X
SYSTEM:= $(shell uname -s)
CHIP:= $(shell uname -m) # only used by Solaris at this time...
ifeq ($(SYSTEM),Darwin)
# MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
MACOSXTARGET := MACOSX_DEPLOYMENT_TARGET=10.$(MACOSX_MINOR)
ifeq ($(MACOSX_MINOR),5)
MACOSX_MINOR = 4
endif
CXX = gcc
CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual -I/usr/include/sys/
#SYSCCFLAGS = -I/usr/include/sys/
LD = gcc
LDFLAGS = $(OPT2) -bind_at_load
SYSCCFLAGS =
SYS_LIBS = -L/usr/lib64
# The SOFLAGS will be used to create the .dylib,
# the .so will be created separately
DllSuf = dylib
UNDEFOPT = dynamic_lookup
ifneq ($(MACOSX_MINOR),4)
ifneq ($(MACOSX_MINOR),3)
UNDEFOPT = suppress
LD = gcc
endif
endif
SOFLAGS = -dynamiclib -single_module -undefined $(UNDEFOPT)
endif
NOOPT =
EXCEPTION =
#Toggle as necessary
PROFILER=
#PROFILER=-lprofiler -ltcmalloc
ifdef USE_FAKE_DATA_DIR
FAKEFLAG = -DUSE_FAKE_DATA_DIR
else
FAKEFLAG =
endif
INCLUDES = -I$(ANITA_FLIGHT_SOFT_DIR) -I$(ANITA_FLIGHT_SOFT_DIR)/common \
-I$(ANITA_FLIGHT_SOFT_DIR)/common/includes -I$(ANITA_FLIGHT_SOFT_DIR)/outside/cr7/include -I$(ANITA_FLIGHT_SOFT_DIR)/outside/anita3/9500256u/ -I$(ANITA_FLIGHT_SOFT_DIR)/common/sipcomLib -I$(ANITA_FLIGHT_SOFT_DIR)/outside/bzip2-1.0.3/ -I/usr/local/surfDriver/include
CCFLAGS = $(EXCEPTION) $(OPT) -fPIC -D_BSD_SOURCE $(INCLUDES) $(FAKEFLAG) $(SYSCCFLAGS)
LDFLAGS = $(EXCEPTION) -L$(ANITA_LIB_DIR) $(SYS_LIBS)
ANITA_LIBS = -lkvp -lConfig -lPedestal -lUtil -lSlow -lm -lz -lLinkWatch $(PROFILER) #-lSocket
ANITA_HKD_LIBS = -lAcromag -lAnitaSbsTemp #-lcr7
ANITA_GPS_LIBS = -lSerial -lAnitaMap -lGpsTools
ANITA_TUFF_LIBS = -lTuff
ANITA_RTL_LIBS = -lrt -Wl,-Bstatic -lrtlsdr -Wl,-Bdynamic -lusb-1.0
ANITA_SIP_LIBS = -lSipcom
ANITA_LOS_LIBS = -lLos
ANITA_COMP_LIBS = -lCompress
ANITA_MAP_LIBS = -lAnitaMap
ANITA_FTP_LIBS = -lAnitaFtp
BZ_LIB = -lbz2
FFTW_LIB = -lfftw3
INSTALL=install
GROUP=anita
OWNER=anita
BINDIR=/usr/bin
LIBDIR=/usr/lib
all: $(Target)
%.$(ObjSuf) : %.$(SrcSuf)
@echo "<**Compiling****> "$<
$(CC) $(CCFLAGS) -c $< -o $@
objclean:
@-rm -f *.o