69 lines
2.1 KiB
Plaintext
69 lines
2.1 KiB
Plaintext
$OpenBSD: patch-Makefile,v 1.6 2003/02/02 22:22:38 margarida Exp $
|
|
--- Makefile.orig Wed Nov 18 04:19:06 1998
|
|
+++ Makefile Sun Feb 2 22:08:06 2003
|
|
@@ -31,24 +31,23 @@
|
|
PROGRAM = xmysql
|
|
|
|
# PROGRAM install path
|
|
-INSTALLPATH = /usr/local/xmysql-1.10
|
|
+INSTALLPATH = ${PREFIX}/bin
|
|
|
|
# pixmap location
|
|
-XMYSQL_XPMPATH = /usr/local/xmysql-1.10
|
|
+XMYSQL_XPMPATH = ${PREFIX}/include/X11/pixmaps
|
|
|
|
# help path
|
|
-XMYSQL_HELPPATH = /usr/local/xmysql-1.10
|
|
+XMYSQL_HELPPATH = ${PREFIX}/lib/X11/xmysql
|
|
|
|
# Compilation Details
|
|
-CC = gcc
|
|
-STDCFLAGS = -g -c -O2 -Wall -DXMYSQL_XPMPATH=\"$(XMYSQL_XPMPATH)\" -DXMYSQL_HELPPATH=\"$(XMYSQL_HELPPATH)\"
|
|
+STDCFLAGS = $(CFLAGS) -DXMYSQL_XPMPATH=\"$(XMYSQL_XPMPATH)\" -DXMYSQL_HELPPATH=\"$(XMYSQL_HELPPATH)\"
|
|
STDLFLAGS =
|
|
-MYSQLINC = -I/usr/include/mysql
|
|
-MYSQLLOAD = -L/usr/lib/mysql -lmysqlclient
|
|
-XFORMLIBDIR = -L/usr/local/xforms
|
|
-XFORMINCDIR = -I/usr/local/xforms
|
|
-XINC =
|
|
-XLOAD = -L/usr/X11R6/lib -lX11
|
|
+MYSQLINC = -I${LOCALBASE}/include/mysql
|
|
+MYSQLLOAD = -L${LOCALBASE}/lib/mysql -lmysqlclient
|
|
+XFORMLIBDIR = -L${LOCALBASE}/lib
|
|
+XFORMINCDIR = -I${LOCALBASE}/include/X11
|
|
+XINC = -I${X11BASE}/include
|
|
+XLOAD = -L${X11BASE}/lib -lX11 -lGL -lXext
|
|
|
|
# objects needed for the program
|
|
OBJS = Xmysql.o \
|
|
@@ -56,21 +55,24 @@ OBJS = Xmysql.o \
|
|
Xmysql_cb.o \
|
|
XmysqlDB.o \
|
|
XmysqlErr.o
|
|
+
|
|
+all: ${PROGRAM}
|
|
|
|
${PROGRAM}: $(OBJS)
|
|
$(CC) -o ${PROGRAM} $(OBJS) $(MYSQLINC) $(XFORMINCDIR) \
|
|
$(XINC) $(STDLFLAGS) $(MYSQLLOAD) \
|
|
- $(XLOAD) $(XFORMLIBDIR) -lforms -lXpm -lm
|
|
+ $(XLOAD) $(XFORMLIBDIR) -lforms -lXpm -lm -ljpeg
|
|
|
|
.c.o:
|
|
- $(CC) $*.c $(STDCFLAGS) $(XFORMINCDIR) $(MYSQLINC) $(XINC)
|
|
+ $(CC) -c $*.c $(STDCFLAGS) $(XFORMINCDIR) $(MYSQLINC) $(XINC)
|
|
|
|
clean:
|
|
rm -f ${PROGRAM} $(OBJS)
|
|
|
|
install:
|
|
install -d $(INSTALLPATH) $(XMYSQL_XPMPATH) $(XMYSQL_HELPPATH)
|
|
- install --mode=711 $(PROGRAM) $(INSTALLPATH)
|
|
- install --mode=744 mysql.xpm $(XMYSQL_XPMPATH)
|
|
- install --mode=744 sqlhelp.txt $(XMYSQL_HELPPATH)
|
|
+ install -s -m ${BINMODE} $(PROGRAM) $(INSTALLPATH)
|
|
+ install -m 444 mysql.xpm $(XMYSQL_XPMPATH)/Mysql.xpm
|
|
+ install -d -m 755 $(XMYSQL_HELPPATH)
|
|
+ install -m 444 sqlhelp.txt $(XMYSQL_HELPPATH)
|
|
|