-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
167 lines (131 loc) · 3.42 KB
/
Makefile
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
SRC = ../library
INCL = ../include
TEST = ../test
UTILS = ../utils
DAEMON = ../daemon
SDR = ../sdr
OPT = -g -Wall -Werror -Dsol5 -Dunix -D__SVR4 -D_REENTRANT -fPIC
CC = gcc $(OPT) -I$(SRC) -I$(TEST) -I$(SDR) -I$(INCL)
LDFLAGS = -fPIC -shared
LD = gcc $(LDFLAGS)
LIBICIOBJS = \
llcv.o \
platform.o \
platform_sm.o \
memmgr.o \
lyst.o \
psm.o \
smlist.o \
sptrace.o \
ion.o \
rfx.o \
ionsec.o \
zco.o \
sdrxn.o \
sdrmgt.o \
sdrstring.o \
sdrlist.o \
sdrtable.o \
sdrhash.o \
sdrcatlg.o \
smrbt.o
PUBINCLS = \
$(INCL)/llcv.h \
$(INCL)/platform.h \
$(INCL)/platform_sm.h \
$(INCL)/memmgr.h \
$(INCL)/lyst.h \
$(INCL)/psm.h \
$(INCL)/smlist.h \
$(INCL)/sptrace.h \
$(INCL)/ion.h \
$(INCL)/zco.h \
$(INCL)/rfx.h \
$(INCL)/ionsec.h \
$(INCL)/sdrxn.h \
$(INCL)/sdrmgt.h \
$(INCL)/sdrstring.h \
$(INCL)/sdrlist.h \
$(INCL)/sdrtable.h \
$(INCL)/sdrhash.h \
$(INCL)/sdr.h \
$(INCL)/smrbt.h
ICIINCLS = \
$(SRC)/lystP.h \
$(SDR)/sdrP.h
UTILITIES = sdrwatch psmwatch ionadmin sdrmend ionsecadmin
TESTPGMS = file2sm sm2file file2sdr sdr2file psmshell smlistsh owltsim owlttb
ALL = check libici.so rfxclock $(UTILITIES) $(TESTPGMS)
all: $(ALL)
check: $(ICIINCLS) $(PUBINCLS)
rm -f *.o
touch check
clean:
rm -f *.o
rm -f $(ALL)
rm -f ./lib/*
rm -f ./bin/*
install:
cp ../include/*.h $(ROOT)/include
cp lib/* $(ROOT)/lib
cp bin/* $(ROOT)/bin
# - - Utility executables - - - -
sdrwatch: sdrwatch.o libici.so
$(CC) -o sdrwatch sdrwatch.o -L./lib -lici -lpthread -lrt -lsocket
cp sdrwatch ./bin
sdrmend: sdrmend.o libici.so
$(CC) -o sdrmend sdrmend.o -L./lib -lici -lpthread -lrt -lsocket
cp sdrmend ./bin
psmwatch: psmwatch.o libici.so
$(CC) -o psmwatch psmwatch.o -L./lib -lici -lpthread -lrt -lsocket
cp psmwatch ./bin
ionadmin: ionadmin.o libici.so
$(CC) -o ionadmin ionadmin.o -L./lib -lici -lpthread -lrt -lsocket
cp ionadmin ./bin
ionsecadmin: ionsecadmin.o libici.so
$(CC) -o ionsecadmin ionsecadmin.o -L./lib -lici -lpthread -lrt -lsocket
cp ionsecadmin ./bin
# - - Test executables - - - -
psmshell: psmshell.o libici.so
$(CC) -o psmshell psmshell.o -L./lib -lici -lpthread -lrt -lsocket
cp psmshell ./bin
smlistsh: smlistsh.o libici.so
$(CC) -o smlistsh smlistsh.o -L./lib -lici -lpthread -lrt -lsocket
cp smlistsh ./bin
file2sm: file2sm.o libici.so
$(CC) -I. -o file2sm file2sm.o -L./lib -lici -lpthread -lrt -lsocket
cp file2sm ./bin
sm2file: sm2file.o libici.so
$(CC) -I. -o sm2file sm2file.o -L./lib -lici -lpthread -lrt -lsocket
cp sm2file ./bin
file2sdr: file2sdr.o libici.so
$(CC) -I. -o file2sdr file2sdr.o -L./lib -lici -lpthread -lrt -lsocket
cp file2sdr ./bin
sdr2file: sdr2file.o libici.so
$(CC) -o sdr2file sdr2file.o -L./lib -lici -lpthread -lrt -lsocket
cp sdr2file ./bin
owltsim: owltsim.o libici.so
$(CC) -o owltsim owltsim.o -L./lib -lici -lpthread -lrt -lsocket
cp owltsim ./bin
owlttb: owlttb.o libici.so
$(CC) -o owlttb owlttb.o -L./lib -lici -lpthread -lrt -lnsl -lsocket
cp owlttb ./bin
# - - Daemon executable - - - -
rfxclock: rfxclock.o libici.so
$(CC) -I. -o rfxclock rfxclock.o -L./lib -lici -lpthread -lrt -lsocket
cp rfxclock ./bin
# - - Libraries - - - - -
libici.so: $(LIBICIOBJS)
$(LD) -o libici.so $(LIBICIOBJS)
cp libici.so ./lib
# - - Object modules - - - - -
%.o: $(SRC)/%.c
$(CC) -c $<
%.o: $(SDR)/%.c
$(CC) -c $<
%.o: $(UTILS)/%.c
$(CC) -c $<
%.o: $(DAEMON)/%.c
$(CC) -c $<
%.o: $(TEST)/%.c
$(CC) -c $<