# Unix makefile for ulfix
#
# The redefinition of strchr() is needed for Unix 4.2 bsd
# (and maybe some other Unices).
#
BSDDEFINE = -Dstrchr=index -Dstrrchr=rindex
#
# On certain systems, such as Unix System III, you may need to define
# $(LINTFLAGS) in the make command line to set system-specific lint flags.
#
# DEFINES collects all -D arguments for cc and lint:
#
DEFINES = $(BSDDEFINE)

CFLAGS = -O $(DEFINES)

#
# ** compile ulfix
#
SRCS = ulfix.c
OBJS = ulfix.o
ulfix: $(OBJS)
	$(CC) $(CFLAGS) $(OBJS) -o ulfix

lint:	$(SRCS)
	lint $(LINTFLAGS) $(DEFINES) $(SRCS)

#
# ** Remove unneeded files
#
clean:
	rm -f $(OBJS) ulfix

ulfix.o	:	ulfix.c

