1 |
CC = gcc -g -inostdinc -I/usr/include -I/usr/include/sys \ |
2 |
-DUNIX -DSOLARIS -DUSECB63 -DTREND |
3 |
CFLAGS = -g -c -Wunused |
4 |
ORACLEFLAGS = -DORACLESNAP |
5 |
|
6 |
RM = rm -f |
7 |
|
8 |
TOP = ../../.. |
9 |
SHAREPATH = $(TOP)/share |
10 |
SRCPATH = $(SHAREPATH)/src |
11 |
SRC = $(SRCPATH)/odss |
12 |
LIBPATH = ../bin |
13 |
|
14 |
CODEBASEPATH = /tools/codebase63/source |
15 |
|
16 |
INCLUDES = \ |
17 |
-I$(SRC) \ |
18 |
-I$(SHAREPATH)/epicsH \ |
19 |
-I$(SRCPATH)/ca \ |
20 |
-I$(SRCPATH)/avm \ |
21 |
-I$(SRCPATH)/newtrend \ |
22 |
-I$(CODEBASEPATH) |
23 |
|
24 |
ALLDEFINES = $(INCLUDES) -DSOLARIS -DUSECB63 -DTREND |
25 |
|
26 |
DBLIB = ../bin/dbLibrary.a |
27 |
|
28 |
LIBS = \ |
29 |
../bin/libCom.a \ |
30 |
../bin/tisMsgLib.a \ |
31 |
../bin/libca.a \ |
32 |
../bin/libtis.a \ |
33 |
../bin/libUnix.a \ |
34 |
$(CODEBASEPATH)/libcb.a |
35 |
|
36 |
XBASELIBS = ../xbaseSnapLib.a |
37 |
|
38 |
# Oracle stuff for odss |
39 |
ORACLEHOME = /tools/oracle |
40 |
|
41 |
OSNAPLIB = ../bin/liboracleSnap.a |
42 |
|
43 |
ORLIBS = -L$(ORACLEHOME)/lib -lsql $(ORACLEHOME)/lib/osntab.o -lsqlnet \ |
44 |
-lora -lsqlnet -lpls -lora -lnlsrtl3 -lc3v6 -lcore3 -lnlsrtl3 \ |
45 |
-lcore3 -lsocket -lnsl -lm -ldl -laio -lsocket -lnsl -lm -ldl |
46 |
|
47 |
# Xbase stuff for odss |
48 |
XBASELIB = ../bin/xbaseSnapLib.a |
49 |
|
50 |
SRCS = \ |
51 |
$(SRC)/odssMain.c \ |
52 |
$(SRC)/odssApp.c |
53 |
|
54 |
OBJS = \ |
55 |
odssMain.o \ |
56 |
odssApp.o |
57 |
|
58 |
ORACLEOBJS = \ |
59 |
oracleOdssMain.o \ |
60 |
oracleOdssApp.o |
61 |
|
62 |
all: depend odss oracleOdss |
63 |
|
64 |
########### TARGETS ################################################################## |
65 |
|
66 |
odss: $(OBJS) $(DBLIB) $(LIBS) $(XBASELIB) |
67 |
$(RM) odss |
68 |
$(CC) -o odss $(OBJS) $(XBASELIB) $(DBLIB) $(LIBS) -lm -lnsl -lsocket |
69 |
|
70 |
oracleOdss: $(ORACLEOBJS) $(DBLIB) $(LIBS) $(OSNAPLIB) |
71 |
$(RM) oracleOdss |
72 |
$(CC) -o oracleOdss $(ORACLEOBJS) $(OSNAPLIB) $(DBLIB) $(LIBS) $(ORLIBS) \ |
73 |
-lm -lnsl -lsocket |
74 |
|
75 |
########### OBJECTS ################################################################## |
76 |
|
77 |
odssMain.o: $(SRC)/odssMain.c |
78 |
$(RM) odssMain.o |
79 |
$(CC) $(CFLAGS) $(INCLUDES) $(SRC)/odssMain.c |
80 |
|
81 |
odssApp.o: $(SRC)/odssApp.c |
82 |
$(RM) odssApp.o |
83 |
$(CC) $(CFLAGS) $(INCLUDES) $(SRC)/odssApp.c |
84 |
|
85 |
oracleOdssMain.o: $(SRC)/odssMain.c |
86 |
$(RM) oracleOdssMain.o |
87 |
$(CC) -o oracleOdssMain.o $(CFLAGS) $(ORACLEFLAGS) $(INCLUDES) $(SRC)/odssMain.c |
88 |
|
89 |
oracleOdssApp.o: $(SRC)/odssApp.c |
90 |
$(RM) oracleOdssApp.o |
91 |
$(CC) -o oracleOdssApp.o $(CFLAGS) $(ORACLEFLAGS) $(INCLUDES) $(SRC)/odssApp.c |
92 |
|
93 |
install : |
94 |
cp -p odss ../bin |
95 |
cp -p oracleOdss ../bin |
96 |
|
97 |
clean: |
98 |
$(RM) $(OBJS) |
99 |
$(RM) $(ORACLEOBJS) |
100 |
$(RM) odss |
101 |
$(RM) oracleOdss |
102 |
$(RM) Makefile.depend |
103 |
|
104 |
depend: Makefile.depend |
105 |
|
106 |
Makefile.depend: $(SRCS) Makefile |
107 |
$(RM) Makefile.depend |
108 |
$(CC) -M $(ALLDEFINES) $(SRCS) > Makefile.depend |
109 |
|
110 |
include Makefile.depend |
111 |
|