1 ##############################################################################
3 # $Id: GNUmakefile,v 1.5 2004/06/20 12:24:21 nedko Exp $
9 # Nedko Arnaudov <nedko@users.sourceforge.net>
12 # GNU GENERAL PUBLIC LICENSE version 2
14 ##############################################################################
18 include $(PATHTOTOP
)common.mk
23 SOURCES
= libdb.c memory.c mysql.c sqlite.c
25 OBJECTS
= $(SOURCES
:%.c
=%.o
)
26 DEP_FILES
= $(OBJECTS
:.o
=.d
)
33 $(ECHO
) "Compiling $< to $@ ..."
34 $(CC
) $(CFLAGS
) $< -o
$@
37 @echo
"Creating dependency file $@ for $<"
41 $(ECHO
) "Creating library $@"
42 $(TOOL_PREFIX
)ar -rc
$@
$(OBJECTS
)
43 $(TOOL_PREFIX
)ranlib
$@
46 $(ECHO
) "Removing dependency files ..."
47 $(RM_BEGIN
) $(DEP_FILES
) $(RM_END
)
50 $(ECHO
) "Cleaning ..."
51 $(RM_BEGIN
) libdb.a
$(RM_END
)
52 $(RM_BEGIN
) $(OBJECTS
) $(RM_END
)
53 $(RM_BEGIN
) test.o
$(RM_END
)
54 $(RM_BEGIN
) test $(RM_END
)
56 rebuild
: clean libdb.a
test
60 $(LINK
) test.o libdb.a
-lmysqlclient
-lsqlite
$(LINKFLAGS
) -o
$@
62 # All object and dependency files depend on this file
63 $(OBJECTS
) $(DEP_FILES
): GNUmakefile
65 ifeq (,$(findstring clean,$(TARGET
)))
69 ##############################################################################
73 # !!! WARNING !!! Following lines are automatically updated by the CVS system.
75 # $Log: GNUmakefile,v $
76 # Revision 1.5 2004/06/20 12:24:21 nedko
77 # Use dependency files.
78 # Use common tool variables.
80 # Revision 1.4 2004/05/21 23:38:40 nedko
83 # Revision 1.3 2004/05/11 01:18:53 nedko
84 # Implement SQLite backend.
86 # Revision 1.2 2004/05/02 20:12:11 nedko
87 # Improve error dumps.
89 # Revision 1.1 2004/04/27 09:12:28 nedko
92 ##############################################################################