1#------------------------------------------------------------------------------
2
3# read the generic settings
4include	../../Makefile.defaults
5include	../../env.properties
6
7#------------------------------------------------------------------------------
8
9  DDEFINES 	=
10
11  DELIVERABLES	= crund crundAB
12
13  CLEAN		= core *.o
14
15  MOSTLYCLEAN	= $(DELIVERABLES) *.dSYM *% log_*
16
17  DISTCLEAN	= *~ *% */*~ .depend.* _dummy.*
18
19  INCLUDES	= -I. -I"$(HELPERS)" \
20		  $(NDB_INCLUDEOPT0) $(NDB_INCLUDEOPT1) \
21		  $(NDB_INCLUDEOPT2) $(NDB_INCLUDEOPT3)
22
23# for library dependencies, LOADLIBES and LDLIBS have been used historically
24# this convention is used sometimes: use
25#   LDLIBS for project-wide libs (like -lc or -lm)
26#   LOADLIBES for libs for the individual case
27# check with non-gnu makes: use of LOADLIBES, LDLIBS
28  LDLIBS	= -L$(NDB_LIBDIR0) -L$(NDB_LIBDIR1) -lndbclient
29# undefined symbols when linking with
30#  LOADLIBES	= -L$(HELPERS) -lutils
31# which seems to be the same as
32#  LOADLIBES	= $(HELPERS)/libutils.dylib
33# but linking statically is fine:
34  LOADLIBES	= $(HELPERS)/libutils.a
35
36#------------------------------------------------------------------------------
37
38.PHONY:	all depend dep \
39	run.crund run.ndbapi grind.crund
40
41all:	$(DELIVERABLES)
42
43dep depend:
44
45run.crund:	crund
46	./crund -p ../../crundRun.properties -p ../../crundNdb.properties
47
48run.ndbapi:	crundAB
49	./crundAB -p ../../crundRun.properties -p ../../crundNdb.properties
50
51# for JVM processes, try running valgrind with
52# --smc-check=all --trace-children=yes --leak-check=full --show-reachable=yes
53grind.crund:	crund
54	valgrind \
55	--leak-check=full --show-reachable=yes --trace-children=yes \
56	./crund -p ../../crundRun.properties -p ../../crundNdb.properties
57
58crund:	Driver.o CrundDriver.o CrundLoad.o NdbapiAB.o
59
60crundAB:	Driver.o CrundDriver.o CrundLoad.o NdbapiAB.o
61
62#tws:	Driver.o TwsDriver.o NdbapiTwsDriver.o
63#	$(LINK.cpp) $^ $(LOADLIBES) $(LDLIBS) -o $@
64#
65#run.tws:	tws
66#	./tws -p ../../twsRun.properties -p ../../crundNdb.properties
67#
68# for JVM processes, try running valgrind with
69# --smc-check=all --trace-children=yes --leak-check=full --show-reachable=yes
70#grind.tws:	tws
71#	valgrind \
72#	--leak-check=full --show-reachable=yes --trace-children=yes \
73#	./tws -p ../../twsRun.properties -p ../../crundNdb.properties
74
75#------------------------------------------------------------------------------
76
77.depend:
78	touch $@
79
80# read local dependencies
81-include	.depend
82
83#------------------------------------------------------------------------------
84