# Master Makefile for GNU find, xargs, and locate.
# Copyright (C) 1987, 1990, 1991 Free Software Foundation, Inc.

CC = gcc -O -s
AR = ar
RANLIB = ar s

# Things you might add to DEFS:
# -DCACHE_IDS		If you want find -nouser and -nogroup to make
#			tables of used UIDs and GIDs at startup
#			instead of using getpwuid or getgrgid when
#			needed.  Speeds up -nouser and -nogroup unless
#			you are running NIS or Hesiod, which make
#			password and group calls very expensive.
# -DSTDC_HEADERS	If you have ANSI C headers and libraries.
# -DHAVE_UNISTD_H	If you have unistd.h.
# -DUSG			If you have System V/ANSI C string headers and
#			functions, and ndir.h.
# -DDIRENT		If you have dirent.h.
# -DSYSNDIR		Old Xenix systems (selects sys/ndir.h).
# -DVOID_CLOSEDIR	If your closedir function returns void, not int.
# -DMAJOR_IN_MKDEV	If major, minor, makedev defined in sys/mkdev.h.
# -DMAJOR_IN_SYSMACROS	If major, minor, makedev defined in sys/sysmacros.h.
# -DLIMITS_H_MISSING	If you lack limits.h (uses sys/param.h instead).
# -DST_BLOCKS_MISSING	If your `struct stat' lacks st_blocks and st_blksize.
# -DSTRERROR_MISSING	If you lack strerror function.
# -DVPRINTF_MISSING	If you lack vprintf function (but have _doprnt).
# -DDOPRNT_MISSING	If you lack _doprnt function.  Also need to define
#			-DVPRINTF_MISSING.
# -DTM_ZONE_MISSING	If you lack tm_zone in struct tm; instead
#			use tm_isdst and tzname.
# -DTZNAME_MISSING	If you lack tm_zone and tzname; instead use
#			tm_isdst and timezone.  Also need to define
#			TM_ZONE_MISSING.
# Define zero or one of the following:
# If no FSTYPE_* is defined, -fstype treats every filesystem as type "unknown".
# -DFSTYPE_MNTENT	Use 4.3BSD getmntent to get filesystem type.
# -DFSTYPE_GETMNT	Use Ultrix getmnt to get filesystem type.
# -DFSTYPE_STATFS	Use 4.4BSD statfs to get filesystem type.
# -DFSTYPE_USG_STATFS	Use SVR3.2 statfs to get filesystem type.
# -DFSTYPE_AIX_STATFS	Use AIX3 statfs to get filesystem type.
# -DFSTYPE_STATVFS	Use SVR4 statvfs to get filesystem type.

DEFS = -DOS2 -DUSG -DSTDC_HEADERS -DSTPCPY_MISSING

CFLAGS = 
LDFLAGS = 
LIBS = -los2

# Arguments to pass to subdirectory makes.
MDEFINES = AR="$(AR)" RANLIB="$(RANLIB)" DEFS="$(DEFS)" \
CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" LIBS="$(LIBS)" CC="$(CC)"

all:
	cd lib & $(MAKE) $(MDEFINES) $@ & cd ..
	cd find & $(MAKE) $(MDEFINES) $@ & cd ..
	cd xargs & $(MAKE) $(MDEFINES) $@ & cd ..
	cd locate & $(MAKE) $(MDEFINES) $@ & cd ..
.PHONY: all
