#
CFLAGS=-Wall -pipe -m486 -O3 $(USESHM) -I/usr/X11R6/include  

#comment out the next 2 lines if your computer does not have shared memory
XSHMEMLIB=-lXext
USESHM=-DXSHMEM
INSTDIR=/usr/X11R6/bin

LDFLAGS=$(CFLAGS)

C_SRCS=xfqcam.c controlpanel.c

TARGETS=xfqcam 


xfqcam: xfqcam.o controlpanel.o 
	$(CC) $(LDFLAGS) -o xfqcam xfqcam.o controlpanel.o -L.  \
			-L/usr/X11R6/lib -lxforms $(XSHMEMLIB) -lX11 -lm 

depend:: $(C_SRCS)
	sed '/\#\#\# Dependencies/q' < Makefile > tmp_make
	$(CC) $(CFLAGS) -MM $(C_SRCS) >> tmp_make
	mv tmp_make Makefile

install: $(TARGETS)
	install -c -o root -m 4711 $(TARGETS) $(INSTDIR)


clean:
	rm -f *.o $(TARGETS)

package:
	tar cfvz xfqcam.tgz *.c *.h *.fd Makefile xfqcam README 

### Dependencies:
xfqcam.o : xfqcam.c controlpanel.h 
controlpanel.o : controlpanel.c /usr/include/forms.h controlpanel.h 
