# Linux
CC=		gcc
CFLAGS=		-O2 -pipe
CPPFLAGS=	-I../ld
PKG=		/usr/lcc
BINDIR=		$(PKG)/bin
CHMEM=		true
MAKEDEPEND=	gcc -MM

# Minix, lcc
#CC=		lcc
#CHIP=		T800
#CFLAGS=		-$(CHIP) -obj
#PKG=		/usr/lcc
#BINDIR=		$(PKG)/bin.$(CHIP)
#LDFLAGS=	-$(CHIP)
#CHMEM=		chmem
#MAKEDEPEND=	mkdef -d

OBJS=		strip.o

all:		strip

strip:		$(OBJS)
		$(CC) $(LDFLAGS) -o $@ $(OBJS)

strip.o:	strip.c
		$(CC) -c $(CFLAGS) $(CPPFLAGS) strip.c

install.bin:	all
		install -c -s strip $(BINDIR)/strip

install.man:
		install -c -m 644 strip.1 $(PKG)/man/en/man1/strip.1

install.zman:
		compress <strip.1 >_; install -c -m 644 _ $(PKG)/man/en/man1.Z/strip.1

install.msg:
		rm -f _; $(GENCAT) _ strip-de.msg; install -c -m 644 _ $(PKG)/locale/de.88591/LC_MESSAGES/strip.cat

depend:
		$(MAKEDEPEND) $(CPPFLAGS) *.c > .depend

clean:
		rm -f *.o _

clobber:	clean
		rm -f core strip

include .depend
