##
## Makefile for projector control program.
## Copyright 2001 Board of Trustees of the University of Illinois
## John E. Stone (johns@ks.uiuc.edu) (j.stone@acm.org) (johns@megapixel.com)
##
## $Id: Makefile,v 1.4 2001/04/11 03:15:32 johns Exp $
##


##
## Edit the CC, CFLAGS, AR, and RANLIB compilation variables for your own
## system and preferences.
##
CC = cc
#CFLAGS = -O -Aa
CFLAGS = -O 
AR = ar
RANLIB = touch


##
## You shouldn't need to modify anything below this point under normal
## circumstances.
##

OBJS = main.o serial.o

all : projector

projector : main.o serial.o
	$(CC) $(CFLAGS) main.o serial.o -o projector

main.o : main.c
	$(CC) $(CFLAGS) -c main.c -c

serial.o : serial.c serial.h
	$(CC) $(CFLAGS) -c serial.c

clean :
	rm -f $(OBJS) projector

distrib: 
	@echo "Building Projector Distribution..."
	@echo "making /tmp/projector`date '+%m%d%y'`.tar.gz"
	rm -f /tmp/projector`date '+%m%d%y'`.tar
	rm -f /tmp/projector`date '+%m%d%y'`.tar.gz
	(cd ../; \
	tar -cf /tmp/projector`date '+%m%d%y'`.tar \
	projector/main.c projector/serial.c projector/serial.h \
	projector/Makefile projector/README \
	)
	gzip /tmp/projector`date '+%m%d%y'`.tar
	@echo "Distribution created."



