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.2 2004/09/27 15:59:30 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 |
|
40 |
MALETESH=$(O)/maletesh$(EXE) |
41 |
|
42 |
# standard make defines |
43 |
ifndef CC |
44 |
CC=gcc |
45 |
endif |
46 |
|
47 |
ifndef NDEBUG |
48 |
DBG=-g |
49 |
else |
50 |
DBG=-DNDEBUG |
51 |
endif |
52 |
# ARCH=-march=i586 |
53 |
|
54 |
# compile |
55 |
CPPFLAGS=-I.. |
56 |
# note that -O is necessary for -Wuninitialized warnings |
57 |
# -fstack-check ??? |
58 |
CFLAGS=$(DBG) -O2 -Wall -W -Wshadow -pedantic -Wno-long-long |
59 |
|
60 |
|
61 |
|
62 |
# ############################# link ################################## |
63 |
#ifeq (solaris,$(OSTYPE)) # rt for nanosleep -- included in TCL_LIBS |
64 |
#SYSLIBS=-lrt |
65 |
#endif |
66 |
|
67 |
|
68 |
# ############################# targets ################################## |
69 |
# |
70 |
# standard default target |
71 |
all: maletesh |
72 |
maletesh: core pw maletecl |
73 |
.PHONY: all clean core pw maletecl maletesh testdb |
74 |
|
75 |
include ../core/core.mk |
76 |
include ../pw/pw.mk |
77 |
include ../tcl/maletecl.mk |
78 |
|
79 |
ifndef FORCE_STATIC |
80 |
LINK_TCL=$(TCL_LIB_SPEC) $(TCL_LD_SEARCH_FLAGS) $(TCL_LIBS) |
81 |
else |
82 |
LINK_TCL=$(TCL_LIB_SPEC:lib=lib.a) $(TCL_LD_SEARCH_FLAGS) $(TCL_LIBS) |
83 |
endif |
84 |
|
85 |
clean: |
86 |
rm -rf ../bin ../win |
87 |
[ ! -f core ] || rm core |
88 |
|
89 |
$(MALETESH): $(O)/maletesh.o $(CORE:%=$(O)/%.o) $(PW:%=$(O)/%.o) $(MALETECL:%=$(O)/%.o) |
90 |
$(CC) $(DBG) -o $@ $^ $(LINK_TCL) |
91 |
|
92 |
|
93 |
# ########################## demos and tests ############################### |
94 |
# |
95 |
maletesh: $(MALETESH) |
96 |
# $(RUN) $(MALETESH) |
97 |
|
98 |
cleandb: |
99 |
rm -rf ../test/test.* |
100 |
|
101 |
|
102 |
# ############################# rules ################################## |
103 |
# |
104 |
# $@ target $^ all prerequisites $? newer $< first $* stem |
105 |
# |