# Makefile for camera.

# The following compile switches can turn on or off various features:
# -DNOHW to build a generic FITS viewer with no hardware hooks. Then also
#    do not need camera.o or corr.o.
# -DNOLISTEN to build version that can not listen for file names from a fifo.
# -DNOSHM to build version that does not try report cam status to shared memory.

CLDFLAGS = -g
CFLAGS = $(CLDFLAGS) -Wall -ffast-math -O2 -I../../libastro -I../../libmisc -I../../libfits -I../../libgsc -I../../libwcs
LDFLAGS = $(CLDFLAGS) -L/usr/X11R6/lib
LIBS = -lXm -lXpm -lXt -lXext -lX11 -lm

pass6:	install

OBJS =	aoi.o arith.o blink.o camera.o corr.o del.o epoch.o fits.o glass.o \
	gsclim.o hist.o ip.o luts.o mag.o main.o measure.o open.o \
	patchlevel.o photom.o photomabs.o print.o ps.o query.o save.o \
	stars.o wcs.o winhist.o ximage.o \
	../../libastro/libastro.a \
	../../libfits/libfits.a \
	../../libmisc/libmisc.a \
	../../libwcs/libwcs.a \
	../../libgsc/libgsc.a

install: camera
	rm -f /usr/local/bin/camera
	cp camera /usr/local/bin

camera: $(OBJS)
	$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)

clean:
	rm -f *.o camera
