/[webpac]/openisis/0.9.9e/tool/Makefile
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /openisis/0.9.9e/tool/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 604 - (show annotations)
Mon Dec 27 21:49:01 2004 UTC (19 years, 3 months ago) by dpavlin
File size: 3187 byte(s)
import of new openisis release, 0.9.9e

1 #
2 #/*
3 # The Malete project - the Z39.2/Z39.50 database framework of OpenIsis.
4 # Version 0.9.x (patchlevel see file Version)
5 # Copyright (C) 2001-2004 by Erik Grziwotz, erik@openisis.org
6 #
7 # This library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
11 #
12 # This library is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 # See the GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this library; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 #
21 # see README for more information
22 #EOH */
23 #
24 # $Id: Makefile,v 1.10 2004/11/03 16:13:04 kripke Exp $
25 # the Makefile
26 #
27
28 ifndef WIN32
29 O=../bin
30 EXE=
31 RUN=
32 else
33 O=../win
34 EXE=.exe
35 RUN=wine --
36 include ../Mingw.mk
37 endif
38
39 MALETE=$(O)/malete$(EXE)
40
41 # standard make defines
42 ifdef DIET
43 CC=/opt/diet/bin/diet -Os gcc
44 else
45 CC=gcc
46 endif
47
48 # DBG=
49 ifndef NDEBUG
50 DBG=-g
51 STRIP=
52 else
53 DBG=-DNDEBUG
54 STRIP=-s
55 endif
56 # ARCH=-march=i586
57
58 # compile
59 CPPFLAGS=-I..
60 # note that -O is necessary for -Wuninitialized warnings
61 # -fstack-check ???
62 CFLAGS=$(DBG) -O2 -Wall -W -Wshadow -pedantic -Wno-long-long -Winline
63
64
65
66 # ############################# link ##################################
67 SYSLIBS=
68 ifeq (solaris,$(OSTYPE))
69 # rt for nanosleep
70 SYSLIBS=-lrt -lsocket -lnsl
71 endif
72 ifdef WIN32
73 # SYSLIBS=-lws2_32
74 SYSLIBS=-lwsock32
75 endif
76
77
78 # ############################# targets ##################################
79 #
80 # standard default target
81 all: malete
82 malete: core pw tool
83 .PHONY: all clean core pw malete testdb
84
85 include ../core/core.mk
86 include ../pw/pw.mk
87 include ../tool/tool.mk
88
89 clean:
90 rm -rf ../bin ../win ../test/test.*
91 [ ! -f core ] || rm core
92
93 $(MALETE): $(O)/malete.o $(CORE:%=$(O)/%.o) $(PW:%=$(O)/%.o) $(TOOL:%=$(O)/%.o)
94 $(CC) $(DBG) $(STRIP) -o $@ $^ $(SYSLIBS)
95
96
97 # ########################## demos and tests ###############################
98 #
99 malete: $(MALETE)
100 $(RUN) $(MALETE)
101
102 ../test/test.m0d: ../test/cds.m0d
103 : "copying cds options ..."
104 cp $< $@
105
106 ../test/test.mrd: ../test/cds.mrd
107 : "copying cds records ..."
108 cp $< $@
109
110 ../test/test.mqd: ../test/cds.mqt
111 : "loading cds index ..."
112 $(RUN) $(MALETE) qload -vi test -f../test/ -wa <../test/cds.mqt
113
114 ../test/test.mrx: ../test/test.mrd
115 : "updating access file/s"
116 [ ! -f $@ ] || rm $@
117 $(RUN) $(MALETE) dbinfo test -f../test/ -wa
118
119 ../test/test.mqx: ../test/test.mqd ../test/test.m0d
120 : "updating access file/s"
121 [ ! -f $@ ] || rm $@
122 $(RUN) $(MALETE) dbinfo test -f../test/ -wa
123
124 cleandb:
125 rm -rf ../test/test.*
126
127 testdb: ../test/test.m0d ../test/test.mrd ../test/test.mqd \
128 ../test/test.mrx ../test/test.mqx
129 @ls -l $^
130
131 server: $(MALETE) testdb
132 $(RUN) $(MALETE) server -vd -S test -f../test/
133
134 # ############################# rules ##################################
135 #
136 # $@ target $^ all prerequisites $? newer $< first $* stem
137 #

  ViewVC Help
Powered by ViewVC 1.1.26