]> git.saurik.com Git - wxWidgets.git/blame - src/iodbc/Makefile
Guess what: ODBC updates and build fixes.
[wxWidgets.git] / src / iodbc / Makefile
CommitLineData
7e616b10
RR
1include ../Version.mk
2include ../Config.mk
1a6944fd
RR
3
4
5
6
7
7e616b10
RR
8INCDIR = .
9OUTFILE = iodbc
1a6944fd 10
7e616b10
RR
11CFLAGS = -O $(PIC) $(ANSI) -I$(INCDIR) -D$(DLDAPI) $(CFLAGSX)\
12 -DVERSION=\"$(VERSION)$(EXTVER)\"
1a6944fd 13
7e616b10
RR
14# ODBC adminiatator is statically linked on BSDI 3.1
15# On this one can comment the following line:
16#
17ODBCDM = $(ODBC_LIBPATH)/$(OUTFILE).$(DLSUFFIX)
1a6944fd 18
7e616b10
RR
19OBJS = dlf.o dlproc.o herr.o henv.o hdbc.o hstmt.o connect.o prepare.o\
20 execute.o result.o fetch.o info.o catalog.o misc.o itrace.o $(OBJX)
1a6944fd 21
7e616b10
RR
22all: $(OBJS) $(ODBCDM) $(ODBC_LIBPATH)/lib$(OUTFILE).a
23 @rm -f $(ODBC_INCLUDE)/isql.h
24 @rm -f $(ODBC_INCLUDE)/isqlext.h
25 @rm -f $(ODBC_INCLUDE)/odbc_types.h
26 @rm -f $(ODBC_INCLUDE)/odbc_funcs.h
27 cp isql.h $(ODBC_INCLUDE)/
28 cp isqlext.h $(ODBC_INCLUDE)/
29 cp odbc_types.h $(ODBC_INCLUDE)/
30 cp odbc_funcs.h $(ODBC_INCLUDE)/
31 @echo
32 @echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
33 @echo
34 @echo Don\'t forget tu update $(ODBC_LIBPATH)/iodbc.ini with your conf
35 @echo
36 @echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 @echo
1a6944fd 38
7e616b10
RR
39clean:
40 \rm -f $(OBJS)
1a6944fd 41
7e616b10 42delete: clean
1a6944fd 43
7e616b10 44delete_all: delete
1a6944fd 45
7e616b10
RR
46misc.o: misc.c
47 $(CC) $(CFLAGS) -DFIX_INI_FILE -DDIR_INI_FILE=\"$(ODBC_LIBPATH)\" -c $<
1a6944fd 48
7e616b10
RR
49$(ODBC_LIBPATH)/lib$(OUTFILE).a: $(OBJS)
50 $(AR) $(ODBC_LIBPATH)/lib$(OUTFILE).a $(OBJS)
51 $(RANLIB) $(ODBC_LIBPATH)/lib$(OUTFILE).a
1a6944fd 52
7e616b10 53$(ODBCDM): $(OBJS)
1a6944fd 54 @echo "Generating iODBC driver manager -->" $(ODBCDM)
7e616b10
RR
55 @rm -f $(ODBCDM)
56 $(LD) $(LDFLAGS) -L$(ODBC_LIBPATH) $(OBJS) -o $(ODBCDM) $(LIBS)
57 if [ ! -f $(ODBC_LIBPATH)/iodbc.ini ]; then cp iodbc.$(OS) $(ODBC_LIBPATH)/iodbc.ini; fi
1a6944fd 58