DCL 3.7.4
Loading...
Searching...
No Matches
src/SQLOracle/Makefile.dso
Go to the documentation of this file.
1OBJS := OciField.o OciParam.o OciData.o \
2 OciQuery.o OciConnection.o OciModuleMain.o
3
4INSTALL := $(OUTPUT_ROOT)/lib
5
6ifneq ($(findstring gcc, $(CC)),)
7 CXFLAGS += -Wno-stringop-truncation
8endif
9
10ifdef __DCL_DEBUG
11 LDFLAGS += -lDCLCoreD
12 NAME := DCLOracleD
13else
14 LDFLAGS += -lDCLCore
15 NAME := DCLOracle
16endif
17
18CXFLAGS += -I$(INSTANTCLIENT)/sdk/include
19LFLAGS_ := -L$(INSTANTCLIENT) -lclntsh
20
21ifneq ($(findstring MINGW, $(UNAME)),)
22 TARGET := $(NAME).dll
23 LFLAGS_ := -loci
24else ifneq ($(findstring AIX, $(UNAME)),)
25 SONAME := $(NAME).so
26 TARGET := $(SONAME).$(VERSION)
27 LDFLAGS := -Wl,-G,-brtl $(LDFLAGS)
28else ifneq ($(findstring Darwin, $(UNAME)),)
29 SONAME := $(NAME).dylib
30 TARGET := $(SONAME).$(VERSION)
31 LDFLAGS := -dynamiclib $(LDFLAGS)
32else
33 SONAME := $(NAME).so
34 TARGET := $(SONAME).$(VERSION)
35 LDFLAGS := -Wl,-soname,$(SONAME) $(LDFLAGS)
36endif
37
38LDFLAGS += $(LFLAGS_)
39
40all: $(TARGET) install
41
42$(TARGET): $(OBJS)
43 $(LD) $(OBJS) -shared $(LDFLAGS) -o $(TARGET)
44
45install:
46 $(CP) $(NAME)* $(INSTALL)/
47ifdef SONAME
48 cd $(INSTALL); $(LN) -sf $(TARGET) $(SONAME)
49endif
50
51clean:
52 $(RM) -f $(OBJS) $(TARGET)