# # File: Makefile # # Copyright (C) 1998 Ugo Paternostro # # This file is part of the dc20ctrl package. The complete package can be # downloaded from: # http://aguirre.dsi.unifi.it/~paterno/binaries/dc20ctrl.tar.gz # # This package is derived from the dc20 package, built by Karl Hakimian # that you can find it at ftp.eecs.wsu.edu in the # /pub/hakimian directory. The complete URL is: # ftp://ftp.eecs.wsu.edu/pub/hakimian/dc20.tar.gz # # This package also includes a sligthly modified version of the Comet to ppm # conversion routine written by YOSHIDA Hideki # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # Makefile for the dc20ctrl project # # $Id: Makefile,v 1.3 1998/02/18 10:17:14 ugo Exp $ # # # Define here your default serial port. If not defined, dc20ctrl will use # /dev/cuaa0 on FreeBSD and /dev/ttyS0 otherwise (useful for Linux). # # Uncomment the following line for Rocket serial under Linux # DC20CTRL_TTY=\"/dev/ttyR1\" # # We need the math lib for the raw -> 24 bit conversion routine # LIBS=-lm CFLAGS+=-Wall # # How to install the package. # INSTALL?=/usr/bin/install # # Under FreeBSD we need to make it SGID to dialer, that is the serial port # owner. # INSTALL_GROUP=dialer INSTALL_MODE=02755 # # Where to install it. # ROOTDIR=${PREFIX} BINDIR=${ROOTDIR}/bin MANDIR=${ROOTDIR}/man # # You can choose to include JPEG, TIFF and PNG support in the program simply # making it with -DUSE_JPEG, -DUSE_TIFF or -DUSE_PNG on the make command # line. You may choose zero or more file format to support: the pgm and ppm # support is built in. # # # Used only if you make the project with USE_JPEG defined. # JPEGLIB=-ljpeg # # Used only if you make the project with USE_TIFF defined. # TIFFLIB=-ltiff # # Used only if you make the project with USE_PNG defined. # PNGLIB=-lpng # # EXTRA_LIBS_PATH and EXTRA_INCLUDES_PATH variables are used only if you # make the project with at least one between USE_JPEG, USE_TIFF and USE_PNG # defined. # EXTRA_LIBS_PATH=-L${LOCALBASE}/lib EXTRA_INCLUDES_PATH=-I${LOCALBASE}/include # # Do not change anything below this line # ###################################################################### PROJECT=dc20ctrl VERSION=0 REVISION=4 .if defined(DC20CTRL_TTY) CFLAGS+=-DDC20CTRL_TTY=$(DC20CTRL_TTY) .endif .if defined(USE_JPEG) LIBS+=${JPEGLIB} CFLAGS+=-DUSE_JPEG .endif .if defined(USE_TIFF) LIBS+=${TIFFLIB} CFLAGS+=-DUSE_TIFF .endif .if defined(USE_PNG) LIBS+=${PNGLIB} CFLAGS+=-DUSE_PNG .endif .if defined(USE_JPEG) || defined(USE_TIFF) || defined(USE_PNG) LFLAGS+=${EXTRA_LIBS_PATH} CFLAGS+=${EXTRA_INCLUDES_PATH} .endif .if defined(DEBUG) CFLAGS+=-g .endif CFLAGS+=-DVERSION=${VERSION} -DREVISION=${REVISION} SRC=main.c send_pck.c get_info.c init_dc20.c get_thumb.c read_data.c \ thumbs_to_file.c get_pic.c pics_to_file.c hash_mark.c shoot.c erase.c \ change_res.c comet_to_ppm.c pixmaps.c session.c convert_pic.c OBJ=main.o send_pck.o get_info.o init_dc20.o get_thumb.o read_data.o \ thumbs_to_file.o get_pic.o pics_to_file.o hash_mark.o shoot.o erase.o \ change_res.o comet_to_ppm.o pixmaps.o session.o convert_pic.o all: $(PROJECT) archive: (cd ..; tar czplvf ${PROJECT}-${VERSION}.${REVISION}/${PROJECT}-${VERSION}.${REVISION}.tar.gz ${PROJECT}-${VERSION}.${REVISION}/COPYING ${PROJECT}-${VERSION}.${REVISION}/HISTORY ${PROJECT}-${VERSION}.${REVISION}/README* ${PROJECT}-${VERSION}.${REVISION}/TODO* ${PROJECT}-${VERSION}.${REVISION}/Makefile ${PROJECT}-${VERSION}.${REVISION}/*.[ch] ${PROJECT}-${VERSION}.${REVISION}/dc20ctrl.man) boot: clean depend make ${MAKEFLAGS} install: install.bin install.man install.bin: $(PROJECT) ${INSTALL} -c -o ${BINOWN} -g ${INSTALL_GROUP} -m ${INSTALL_MODE} ${PROJECT} ${BINDIR} install.man: ${INSTALL} -c -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} ${PROJECT}.man ${MANDIR}/man1/${PROJECT}.1 man: ${PROJECT}.1 ${PROJECT}.1: ${PROJECT}.man nroff -man ${PROJECT}.man >${PROJECT}.1 $(PROJECT): $(OBJ) ${CC} -o $@ $(OBJ) $(LFLAGS) $(LIBS) clean: rm -f $(OBJ) $(PROJECT) core $(PROJECT).core *.bak a.out .depend $(PROJECT)-${VERSION}.${REVISION}.tar.gz depend: mkdep $(CFLAGS) $(SRC)