# Makefile for the second extended file system programs
#
# Copyright (C) 1992, 1993 Remy Card (card@masi.ibp.fr)
#
# This file can be redistributed under the terms of the GNU General
# Public License

.EXPORT_ALL_VARIABLES:

CC=		gcc
# 486 optimizations
#CC=		gcc -m486

# Default compiler options
OPTFLAGS=	-O6 -fomit-frame-pointer -pipe -DNO_DEBUG
LDFLAGS=	-s

# For debugging the programs
#OPTFLAGS=	-g
#LDFLAGS=	-g

CFLAGS=		$(OPTFLAGS) -Wall -Wstrict-prototypes

# Delete -DDBMALLOC and the -ldbmalloc line if you don't want to use the 
# debugging malloc library.
#CFLAGS:=	$(CFLAGS) -I/usr/debug_include -DDBMALLOC
#LDLIBS:=	$(LDLIBS) -ldbmalloc

SUBDIRS=	lib progs man
SBINDIR=	/sbin
UBINDIR=	/usr/bin
SMANDIR=	/usr/man/man8
UMANDIR=	/usr/man/man1

all:		subdirs

subdirs:
	@for d in $(SUBDIRS); do (cd $$d && $(MAKE)) || exit; done

clean:
	@for d in $(SUBDIRS); do (cd $$d && $(MAKE) clean) || exit; done

realclean clobber spotless:
	@for d in $(SUBDIRS); do (cd $$d && $(MAKE) $@) || exit; done

install:
	@for d in $(SUBDIRS); do (cd $$d && $(MAKE) install) || exit; done

dep depend:
	@for d in $(SUBDIRS); do (cd $$d && $(MAKE) $@) || exit; done
