2 # Copyright (C) 2007 David Härdeman <david@hardeman.nu>
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU General Public License as published by the
6 # Free Software Foundation; only version 2 of the License is applicable.
8 # This program is distributed in the hope that it will be useful, but
9 # WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # General Public License for more details.
13 # You should have received a copy of the GNU General Public License along
14 # with this program; if not, write to the Free Software Foundation, Inc.,
15 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 CFLAGS
+= -g
-Wall
-pedantic
-std
=c99
-D_FILE_OFFSET_BITS
=64 -O2
26 INSTALL_PROGRAM
= ${INSTALL}
27 INSTALL_DATA
= ${INSTALL} -m
644
28 COMPILE
= $(CC
) $(INCLUDES
) $(CFLAGS
) $(CPPFLAGS
)
29 LINK
= $(CC
) $(CFLAGS
) $(LDFLAGS
)
30 OBJECTS
= utils.o metastore.o metaentry.o
31 HEADERS
= utils.h metastore.h metaentry.h
33 PROJ_DIR
:= $(dir $(lastword
$(MAKEFILE_LIST
)))
34 SRCS_DIR
:= $(PROJ_DIR
)src
/
38 usrbindir
= ${prefix}/bin
39 mandir = ${prefix}/share
/man
53 $(COMPILE
) -o
$@
-c
$<
57 $(LINK
) -o
$@
$^
$(LIBS
)
61 $(INSTALL_DATA
) -D metastore
.1 $(DESTDIR
)$(mandir)/man1
/metastore
.1
62 $(INSTALL_PROGRAM
) -D metastore
$(DESTDIR
)$(usrbindir
)/metastore
66 - rm -f
$(DESTDIR
)$(mandir)/man1
/metastore
.1
67 - rm -f
$(DESTDIR
)$(usrbindir
)/metastore
74 .PHONY
: install uninstall clean all