File: Makefile.w32

package info (click to toggle)
libdbi-drivers 0.9.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,148 kB
  • ctags: 1,900
  • sloc: ansic: 18,980; sh: 10,942; xml: 2,759; makefile: 577
file content (103 lines) | stat: -rw-r--r-- 4,404 bytes parent folder | download | duplicates (4)
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
# this makefile is for building Win32 DLLs with cygwin
# By default, the "all" and "install" targets assume that you have all
# client libraries around which may not be the case. In order to build
# a particular driver, run make like this:
# make libXYZ-dll
# make install-libXYZ
# where XYZ is one of msql, mysql, pgsql, or sqlite

SHELL = /bin/sh

srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}

bindir = ${exec_prefix}/bin
libdir = ${exec_prefix}/lib

top_builddir = .

INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
transform = s,x,x,

NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = i686-pc-cygwin
host_triplet = i686-pc-cygwin
AS = @AS@
CC = gcc
DEBUG = -g -Wall -D__NO_MATH_INLINES -fsigned-char
MSQL_LIBS = -L /usr/local/lib -L /usr/local/msql3/lib -ldbi -lmsql -liberty -lz
MYSQL_LIBS = -L /usr/local/lib -ldbi -lmysqlclient -liberty -lz
PGSQL_LIBS = -L /usr/local/lib -ldbi -lpq -liberty
SQLITE_LIBS = -L /usr/local/lib -ldbi -lsqlite -liberty
SQLITE3_LIBS = -L /usr/local/lib -ldbi -lsqlite3 -liberty
driverdir = ${exec_prefix}/lib/dbd

LIBMSQL_DLL_NAME = libdbdmsql.dll
LIBMYSQL_DLL_NAME = libdbdmysql.dll
LIBPGSQL_DLL_NAME = libdbdpgsql.dll
LIBSQLITE_DLL_NAME = libdbdsqlite.dll
LIBSQLITE3_DLL_NAME = libdbdsqlite3.dll

LIBMSQL_DLL_EXP_LIB = libdbdmsql.dll.a
LIBMYSQL_DLL_EXP_LIB = libdbdmysql.dll.a
LIBPGSQL_DLL_EXP_LIB = libdbdpgsql.dll.a
LIBSQLITE_DLL_EXP_LIB = libdbdsqlite.dll.a
LIBSQLITE3_DLL_EXP_LIB = libdbdsqlite3.dll.a

all: libmysql-dll libpgsql-dll libsqlite-dll libsqlite3-dll libmsql-dll

libmsql-dll: $(top_srcdir)/drivers/msql/dbd_msql.o 
	$(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_EXP_LIB) -o $(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_NAME) -L$(top_srcdir)/src/.libs $(LDFLAGS) $(top_srcdir)/drivers/msql/*.o $(MSQL_LIBS)

libmysql-dll: $(top_srcdir)/drivers/mysql/dbd_mysql.o 
	$(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/mysql/.libs/$(LIBMYSQL_DLL_EXP_LIB) -o $(top_srcdir)/drivers/mysql/.libs/$(LIBMYSQL_DLL_NAME) -L$(top_srcdir)/src/.libs $(LDFLAGS) $(top_srcdir)/drivers/mysql/*.o $(MYSQL_LIBS)

libpgsql-dll: $(top_srcdir)/drivers/pgsql/dbd_pgsql.o
	$(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/pgsql/.libs/$(LIBPGSQL_DLL_EXP_LIB) -o $(top_srcdir)/drivers/pgsql/.libs/$(LIBPGSQL_DLL_NAME) -L$(top_srcdir)/src/.libs $(LDFLAGS) $(top_srcdir)/drivers/pgsql/*.o $(PGSQL_LIBS)

libsqlite-dll: $(top_srcdir)/drivers/sqlite/dbd_sqlite.o 
	$(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_EXP_LIB) -o $(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_NAME)  $(LDFLAGS) $(top_srcdir)/drivers/sqlite/*.o $(SQLITE_LIBS)

libsqlite3-dll: $(top_srcdir)/drivers/sqlite3/dbd_sqlite3.o 
	$(CC) -shared -Wl,--out-implib=$(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_EXP_LIB) -o $(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_NAME)  $(LDFLAGS) $(top_srcdir)/drivers/sqlite3/*.o $(SQLITE3_LIBS)

install: install-libmysql install-libpgsql install-libsqlite install-libsqlite3 install-libmsql

install-libmsql:
	cp $(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_NAME) $(driverdir) && \
	cp $(top_srcdir)/drivers/msql/.libs/$(LIBMSQL_DLL_EXP_LIB) $(driverdir)

install-libmysql:
	cp $(top_srcdir)/drivers/mysql/.libs/$(LIBMYSQL_DLL_NAME) $(driverdir) && \
	cp $(top_srcdir)/drivers/mysql/.libs/$(LIBMYSQL_DLL_EXP_LIB) $(driverdir)

install-libpgsql:
	cp $(top_srcdir)/drivers/pgsql/.libs/$(LIBPGSQL_DLL_NAME) $(driverdir) && \
	cp $(top_srcdir)/drivers/pgsql/.libs/$(LIBPGSQL_DLL_EXP_LIB) $(driverdir)

install-libsqlite:
	cp $(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_NAME) $(driverdir) && \
	cp $(top_srcdir)/drivers/sqlite/.libs/$(LIBSQLITE_DLL_EXP_LIB) $(driverdir)

install-libsqlite3:
	cp $(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_NAME) $(driverdir) && \
	cp $(top_srcdir)/drivers/sqlite3/.libs/$(LIBSQLITE3_DLL_EXP_LIB) $(driverdir)



.PHONY: libdbdmysql.dll libdbdpgsql.dll libdbdsqlite.dll libdbdsqlite3.dll libdbdmsql.dll install install-libmysql install-libpgsql install-libsqlite install-libsqlite3


# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: