#
# Makefile for PIC Programmer
#
# The /usr/include/ncurses include path is needed so that the curses.h
# include will find the right files for ncurses
#
ifeq ($(strip $(CC)),)
  CC = gcc
else
  CC:=${CC}
endif

CFLAGS	= -I/usr/include/ncurses -O2 -Wall -pipe -g
LDFLAGS = -lmenu -lncurses
LIBS	= -lncurses

PICOBJS	= picprg.o lowlvl.o pichex.o

all:		picprg

picprg:		$(PICOBJS)
		$(CC) $(PICOBJS) -o picprg $(LIBS)

clean:
		rm -f *~ *.o core picprg

install:	all
		cp -f picprg /usr/local/bin
		chown root.root /usr/local/bin/picprg
		chmod 4555 /usr/local/bin/picprg

archive:
		tar cvzf picprg.2.2.tar.gz *.c *.h *.doc TODO README Makefile picprg

dist:
		rm -rf picprg.2.2
		mkdir picprg.2.2
		cp {Makefile,*.c,*.h,picprg,README} picprg.2.2/
		tar cvzf picprg.2.2.tar.gz picprg.2.2/*
