# Makefile for pgm tools.
#
# Copyright (C) 1989, 1991 by Jef Poskanzer.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation.  This software is provided "as is" without express or
# implied warranty.

# Default values, usually overridden by top-level Makefile.
CC =		gcc
CFLAGS =	-O -DSYSV -DLINUX -Djump -I../include
LDFLAGS =	-s

libpgm.a:	00_DATA.o libpgm1.o libpgm2.o
	-rm libpgm.a
	ar rc libpgm.a 00_DATA.o libpgm1.o libpgm2.o
	-ranlib libpgm.a

clean:
	-rm -f *.o *.a *.cat core $(BINARIES) pgmmerge

.c.o:
	$(CC) -c $(CFLAGS) $(LOCAL_INCLUDES) \
		$(CPPFLAGS) $*.c -o dummy.o
	ld -r -x dummy.o
	mv a.out $*.o
	rm dummy.o
