0531412ec7
linked with -lxforms requires -ljpeg at least when linking with new binutils ld.
108 lines
3.7 KiB
Plaintext
108 lines
3.7 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.4 2002/07/19 18:42:49 pvalchev Exp $
|
|
--- Makefile.orig Mon Dec 7 04:52:39 1998
|
|
+++ Makefile Fri Jul 19 12:17:04 2002
|
|
@@ -34,7 +34,7 @@ INSTALL = install
|
|
# This is used by 'make install' command
|
|
#-------------------------------------------------------
|
|
#INSTALLPATH = /opt/local/i386/bin
|
|
-INSTALLPATH = /usr/local/bin
|
|
+INSTALLPATH = ${PREFIX}/bin
|
|
########################################################
|
|
|
|
|
|
@@ -45,7 +45,7 @@ INSTALLPATH = /usr/local/bin
|
|
# pixmap file location (mysql.xpm)
|
|
#-------------------------------------------------------
|
|
#PIXMAPPATH = /opt/local/lib
|
|
-PIXMAPPATH = /usr/local/bin
|
|
+PIXMAPPATH = ${PREFIX}/include/X11/pixmaps
|
|
########################################################
|
|
|
|
|
|
@@ -80,8 +80,7 @@ BACKUPDIR = /tmp
|
|
# Compilation Details
|
|
# hum... I think you dont need to change this
|
|
#-------------------------------------------------------
|
|
-CC = gcc
|
|
-STDCFLAGS = -g -c -O2 -Wall -DPIXMAPFILE=\"$(PIXMAPPATH)/mysql.xpm\" \
|
|
+STDCFLAGS = $(CFLAGS) -c -DPIXMAPFILE=\"$(PIXMAPPATH)/mysql.xpm\" \
|
|
-DBACKUP=\"$(BACKUP)\" -DBACKUPDIR=\"$(BACKUPDIR)\" \
|
|
-DBACKUPSUFFIX=\"$(BACKUPSUFFIX)\" \
|
|
-DMYSQL_VERSION=$(MYSQL_VERSION)
|
|
@@ -95,7 +94,7 @@ STDLFLAGS =
|
|
########################################################
|
|
# mysql include dir
|
|
#-------------------------------------------------------
|
|
-MYSQLINC = -I/usr/local/mysql/include/mysql
|
|
+MYSQLINC = -I${LOCALBASE}/include/mysql
|
|
########################################################
|
|
|
|
|
|
@@ -107,7 +106,7 @@ MYSQLINC = -I/usr/local/mysql/include/my
|
|
# mysql database dir
|
|
#-------------------------------------------------------
|
|
#MYSQLDBDIR = -DMYSQLDBDIR="\"/var/lib/mysql/\""
|
|
-MYSQLDBDIR = -DMYSQLDBDIR="\"/usr/local/mysql/var/\""
|
|
+MYSQLDBDIR = -DMYSQLDBDIR="\"/var/mysql/\""
|
|
########################################################
|
|
|
|
|
|
@@ -118,7 +117,7 @@ MYSQLDBDIR = -DMYSQLDBDIR="\"/usr/local/
|
|
########################################################
|
|
# mysql library dir
|
|
#-------------------------------------------------------
|
|
-MYSQLLOAD = -Wl,-R/usr/local/mysql/lib/mysql -L/usr/local/mysql/lib/mysql -lmysqlclient
|
|
+MYSQLLOAD = -Wl,-R${LOCALBASE}/lib/mysql -L${LOCALBASE}/lib/mysql -lmysqlclient
|
|
########################################################
|
|
|
|
|
|
@@ -129,7 +128,7 @@ MYSQLLOAD = -Wl,-R/usr/local/mysql/lib/m
|
|
# xforms librairies dir
|
|
#-------------------------------------------------------
|
|
#XFORMLIBDIR = -L/opt/local/i386/lib
|
|
-XFORMLIBDIR = -L/usr/lib
|
|
+XFORMLIBDIR = -L${LOCALBASE}/lib
|
|
########################################################
|
|
|
|
|
|
@@ -141,7 +140,7 @@ XFORMLIBDIR = -L/usr/lib
|
|
# xforms include dir (xforms.h)
|
|
#-------------------------------------------------------
|
|
#XFORMINCDIR = -I/opt/local/include
|
|
-XFORMINCDIR = -I/usr/X11R6/include
|
|
+XFORMINCDIR = -I${LOCALBASE}/include/X11
|
|
########################################################
|
|
|
|
|
|
@@ -156,8 +155,8 @@ XFORMINCDIR = -I/usr/X11R6/include
|
|
#XLOAD = -L/usr/openwin/lib -lX11
|
|
|
|
# Use this for Linux:
|
|
-XINC =
|
|
-XLOAD = -L/usr/X11R6/lib -lX11 /usr/X11R6/lib/libXpm.so.4
|
|
+XINC = -I${X11BASE}/include
|
|
+XLOAD = -L${X11BASE}/lib -lX11 -lGL -lXext
|
|
########################################################
|
|
|
|
|
|
@@ -215,8 +214,7 @@ OBJS = xmysqladmin.o \
|
|
${PROGRAM}: $(OBJS)
|
|
$(CC) -o ${PROGRAM} $(OBJS) $(MYSQLINC) $(XFORMINCDIR) \
|
|
$(XINC) $(STDLFLAGS) $(MYSQLLOAD) \
|
|
- $(XLOAD) $(XFORMLIBDIR) -lforms $(LIBS)
|
|
- ./$(PROGRAM)
|
|
+ $(XLOAD) $(XFORMLIBDIR) -lforms -lXpm -ljpeg $(LIBS)
|
|
|
|
.c.o:
|
|
$(CC) $*.c $(STDCFLAGS) $(XFORMINCDIR) $(MYSQLINC) $(MYSQLDBDIR) $(XINC)
|
|
@@ -226,7 +224,8 @@ clean:
|
|
|
|
install:
|
|
strip $(PROGRAM)
|
|
- $(INSTALL) -m 711 $(PROGRAM) $(INSTALLPATH)
|
|
+ $(INSTALL) -m ${BINMODE} $(PROGRAM) $(INSTALLPATH)
|
|
+ mkdir -p $(PIXMAPPATH)
|
|
cp mysql.xpm $(PIXMAPPATH)
|
|
|
|
version:
|