File: Makefile.in

package info (click to toggle)
qdbm 1.8.78-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,076 kB
  • sloc: ansic: 31,454; cpp: 3,623; perl: 2,167; java: 2,079; ruby: 1,690; makefile: 1,315; javascript: 627; sh: 396
file content (147 lines) | stat: -rw-r--r-- 3,183 bytes parent folder | download | duplicates (9)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# Makefile for CGI scripts for QDBM



#================================================================
# Setting variables
#================================================================


# Generic settings
SHELL = @SHELL@
srcdir = @srcdir@
VPATH = @srcdir@

# Packaging
PACKAGE = qdbm

# Targets
MYCGIS = qadm.cgi qupl.cgi qfts.cgi
MYCONFS = qadm.conf qupl.conf qfts.conf
MYDOCS = cgispex.html cgispex-ja.html

# Building binaries
CC = gcc
CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(HOME)/include -I/usr/local/include \
  -D_XOPEN_SOURCE_EXTENDED=1 -D_GNU_SOURCE=1 -D__EXTENSIONS__=1 -D_HPUX_SOURCE=1 \
  -D_POSIX_MAPPED_FILES=1 -D_POSIX_SYNCHRONIZED_IO=1 -DNDEBUG
CFLAGS = -Wall -ansi -pedantic -fsigned-char -O2
LIBS = -lqdbm @LIBS@
LDFLAGS = -L$(srcdir)/.. -L$(HOME)/lib -L/usr/local/lib $(LIBS)
LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:$(prefix)/lib

# Install destinations
prefix = @prefix@
exec_prefix = @exec_prefix@
MYLIBEXECDIR = @libexecdir@
MYDATADIR = @datadir@/$(PACKAGE)/cgi
DESTDIR =



#================================================================
# Suffix rules
#================================================================


.SUFFIXES :
.SUFFIXES : .c .o

.c.o :
	$(CC) -c $(CPPFLAGS) $(CFLAGS) $<



#================================================================
# Actions
#================================================================


targets : @TARGETS@


all : $(MYCGIS)
	@printf '\n'
	@printf '#================================================================\n'
	@printf '# Ready to install.\n'
	@printf '#================================================================\n'


static :
	make LDFLAGS="-static $(LDFLAGS)" all


debug :
	make CFLAGS="$(CFLAGS) -g" LDFLAGS="-static $(LDFLAGS)" all


devel :
	make CFLAGS="$(CFLAGS) -g -pipe" all
	sync ; sync


clean :
	rm -rf $(MYCGIS) *.o leak.log *~


install :
	mkdir -p $(DESTDIR)$(MYLIBEXECDIR)
	cp -Rf $(MYCGIS) $(DESTDIR)$(MYLIBEXECDIR)
	mkdir -p $(DESTDIR)$(MYDATADIR)
	cp -Rf $(MYCONFS) $(MYDOCS) $(DESTDIR)$(MYDATADIR)
	@printf '\n'
	@printf '#================================================================\n'
	@printf '# Thanks for using CGI scripts of QDBM.\n'
	@printf '#================================================================\n'


install-strip :
	make DESTDIR=$(DESTDIR) install
	cd $(DESTDIR)$(MYLIBEXECDIR) && strip $(MYCGIS)



uninstall :
	cd $(DESTDIR)$(MYLIBEXECDIR) && rm -f $(MYCGIS)
	rm -rf $(DESTDIR)$(MYDATADIR)


dist :
	autoconf
	make distclean


distclean : clean
	rm -rf Makefile config.cache config.log config.status autom4te.cache \
	  qadmdir/* qupldir/* casket


mingw :
	make CC="gcc -mno-cygwin" MYLIBS="libqdbm.dll.a" \
	  CFLAGS="-Wall -fsigned-char -O0 -DNDEBUG" \
	  LDFLAGS="-L$(srcdir)/.. -L/usr/local/lib -lqdbm"


.PHONY : all clean



#================================================================
# Building binaries
#================================================================


qadm.cgi : qadm.o
	$(LDENV) $(CC) $(CFLAGS) -o $@ qadm.o $(LDFLAGS)


qupl.cgi : qupl.o
	$(LDENV) $(CC) $(CFLAGS) -o $@ qupl.o $(LDFLAGS)


qfts.cgi : qfts.o
	$(LDENV) $(CC) $(CFLAGS) -o $@ qfts.o $(LDFLAGS)



# END OF FILE