1###############################################################################
2#
3# hfsutils - tools for reading and writing Macintosh HFS volumes
4# Copyright (C) 1996, 1997 Robert Leslie
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19#
20###############################################################################
21
22CC =		gcc
23INCLUDES =
24
25LIBS =
26DEFINES =
27
28COPTS =		-g -Wall -pedantic
29CFLAGS =	$(COPTS) $(INCLUDES) $(DEFINES)
30ARFLAGS =	rc
31RANLIB =	ranlib
32
33###############################################################################
34
35TARGET =	libhfs.a
36OBJS =		data.o block.o low.o file.o btree.o node.o record.o volume.o  \
37		hfs.o
38
39###############################################################################
40
41all :: $(TARGET)
42
43again :: depend clean all
44
45depend ::
46	( sed -n '1,/^### DEPEND/p' Makefile;  \
47	  echo;  \
48	  $(CC) -MM $(CFLAGS) *.c;  \
49	) > Makefile.new
50	mv -f Makefile.new Makefile
51
52clean ::
53	rm -f $(TARGET) *.o core
54
55###############################################################################
56
57$(TARGET): $(OBJS)
58	ar $(ARFLAGS) $@  \
59		$(OBJS)
60	$(RANLIB) $@
61
62### DEPENDENCIES FOLLOW #######################################################
63
64block.o: block.c internal.h hfs.h data.h block.h low.h
65btree.o: btree.c internal.h hfs.h data.h block.h file.h btree.h node.h
66data.o: data.c internal.h hfs.h data.h btree.h
67file.o: file.c internal.h hfs.h data.h block.h file.h btree.h record.h \
68 volume.h
69hfs.o: hfs.c internal.h hfs.h data.h block.h low.h file.h btree.h \
70 node.h record.h volume.h
71low.o: low.c internal.h hfs.h data.h block.h low.h file.h
72node.o: node.c internal.h hfs.h data.h btree.h node.h
73record.o: record.c internal.h hfs.h data.h record.h
74volume.o: volume.c internal.h hfs.h data.h low.h btree.h record.h \
75 volume.h
76