File: Makefile

package info (click to toggle)
xmysql 1.8-1
  • links: PTS
  • area: contrib
  • in suites: hamm
  • size: 720 kB
  • ctags: 265
  • sloc: ansic: 2,602; makefile: 63; sql: 1
file content (82 lines) | stat: -rw-r--r-- 2,138 bytes parent folder | download | duplicates (2)
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
#
# Makefile for XmySQL on Linux
#
# Version 1.8
########################################################
# WARNING
#
#     Change INSTALLPATH, XMYSQL_XPMPATH, and XMYSQL_HELPPATH
#     according to where you want the executable,
#     xpm file, and help file to be located.
#
#     Also, you must set MYSQLINC and MYSQLLOAD
#     to point to the MySQL include and library
#     file directories.
#  
#     Also, you must set XFORMLIBDIR and XFORMLIBDIR
#     to point to the Xforms include and library
#     file directories.
#
#     Also, you must set the INC and XLOAD to point
#     to the X include and library file directories.
#
#     You may also have to add a -L to point to the
#     Xpm library directory. In many cases the Xpm
#     library will already be found via the XLOAD 
#     setting.
#
# If you have any problems compiling/linking, please
# drop me an email.
########################################################
PROGRAM = 	xmysql

# PROGRAM install path
#INSTALLPATH = /usr/local/xmysql-1.8
INSTALLPATH = $(DESTDIR)/usr/X11R6/bin/

# pixmap location
#XMYSQL_XPMPATH = /usr/local/xmysql-1.8
XMYSQL_XPMPATH = $(DESTDIR)/usr/X11R6/include/X11/pixmaps/

# help path
#XMYSQL_HELPPATH = /usr/local/xmysql-1.8
XMYSQL_HELPPATH = $(DESTDIR)/usr/lib/xmysql/

# Compilation Details
CC = gcc
STDCFLAGS = -g -c -O2 -Wall -DXMYSQL_XPMPATH=\"$(XMYSQL_XPMPATH)\" -DXMYSQL_HELPPATH=\"$(XMYSQL_HELPPATH)\"
STDLFLAGS = 
MYSQLINC = -I/usr/include/mysql
MYSQLLOAD = -L/usr/lib/mysql -lmysqlclient
XFORMLIBDIR = -L/usr/lib/X11
XFORMINCDIR = -I/usr/include/X11
XINC = 
XLOAD = -L/usr/X11R6/lib  -lX11

# objects needed for the program
OBJS =  Xmysql.o \
	Xmysql_main.o \
	Xmysql_cb.o \
	XmysqlDB.o \
	XmysqlErr.o
 
${PROGRAM}: $(OBJS)
	$(CC) -o ${PROGRAM} $(OBJS) $(MYSQLINC) $(XFORMINCDIR) \
	$(XINC) $(STDLFLAGS) $(MYSQLLOAD) \
	$(XLOAD) $(XFORMLIBDIR) -lforms -lXpm -lm

.c.o:
	$(CC) $*.c $(STDCFLAGS) $(XFORMINCDIR) $(MYSQLINC) $(XINC)

clean:
	rm -f ${PROGRAM} $(OBJS) 

install:
	install --mode=755 $(PROGRAM) $(INSTALLPATH)
	install --mode=644 mysql.xpm $(XMYSQL_XPMPATH)
	install --mode=644 sqlhelp.txt $(XMYSQL_HELPPATH)