From: David Schleef Date: Sun, 15 Jul 2001 23:15:29 +0000 (+0000) Subject: Added user-editable Config file. Add support for $(PREFIX). X-Git-Tag: r0_7_16~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5671f6d9d06faacb21674ddeaf60b89dd42b06c7;p=comedilib.git Added user-editable Config file. Add support for $(PREFIX). --- diff --git a/Config b/Config new file mode 100644 index 0000000..47d794b --- /dev/null +++ b/Config @@ -0,0 +1,40 @@ +#!/usr/bin/make + +# +# If you want to cross-compile Comedilib, change CROSS to something +# useful. +# +CROSS = +#CROSS = i386-uclibc- +#CROSS = powerpc-linux- +CC = $(CROSS)gcc +AR = $(CROSS)ar +LD = $(CROSS)ld + + +# Optimization and debugging +CFLAGS = -Wall -Wstrict-prototypes +CFLAGS += -O2 +#CFLAGS += -g + + +# Python wrapper: +# If you want to build the python wrapper, change this to yes. +with_python = no + + +# Perl wrapper: +# If you want to build the perl wrapper, change this to yes. +with_perl = no + + +# Installation: +# PREFIX is the directory prefix where the library/headers/etc. will +# reside. Typically, this will be /usr or /usr/local. +# DESTDIR is prepended to installation paths only during the install +# phase, so you can install to a different directory than /. Useful +# for packaging. + +PREFIX = /usr +#DESTDIR = $(TOPDIR)/_install + diff --git a/Makefile b/Makefile index 0ac2791..6221b15 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,14 @@ # Makefile for comedi -with_python = no -with_perl = no - -.EXPORT_ALL_VARIABLES: +TOPDIR=`pwd` +include Config include version -MAJOR=0 -CFLAGS = -Wall -O2 +.EXPORT_ALL_VARIABLES: -CROSS := -CC := $(CROSS)gcc -AR := $(CROSS)ar -LD := $(CROSS)ld -INSTALL := install +MAJOR=0 TARGETS = comedilib ifeq ($(with_python),yes) @@ -31,19 +24,19 @@ SUBDIRS= lib demo comedi_calibrate testing comedi_config DOCFILES= README `find doc -type f` -INSTALLDIR=$(DESTDIR)/usr -INSTALLDIR_LIB=$(DESTDIR)/usr/lib +INSTALLDIR=$(DESTDIR)$(PREFIX) +INSTALLDIR_LIB=$(DESTDIR)$(PREFIX)/lib ifneq ($(DEB_BUILD_ARCH),) -INSTALLDIR_DOC=$(DESTDIR)/usr/share/doc/libcomedi -INSTALLDIR_MAN=$(DESTDIR)/usr/share/man -INSTALLDIR_PERL=$(DESTDIR)/usr/lib/perl5/ +INSTALLDIR_DOC=$(DESTDIR)$(PREFIX)/share/doc/libcomedi +INSTALLDIR_MAN=$(DESTDIR)$(PREFIX)/share/man +INSTALLDIR_PERL=$(DESTDIR)$(PREFIX)/lib/perl5/ else -INSTALLDIR_DOC=$(DESTDIR)/usr/doc/libcomedi -INSTALLDIR_MAN=$(DESTDIR)/usr/man -INSTALLDIR_PERL=$(DESTDIR)/usr/lib/perl/ +INSTALLDIR_DOC=$(DESTDIR)$(PREFIX)/doc/libcomedi +INSTALLDIR_MAN=$(DESTDIR)$(PREFIX)/man +INSTALLDIR_PERL=$(DESTDIR)$(PREFIX)/lib/perl/ endif -INSTALLDIR_BIN=$(DESTDIR)/usr/bin -INSTALLDIR_SBIN=$(DESTDIR)/usr/sbin +INSTALLDIR_BIN=$(DESTDIR)$(PREFIX)/bin +INSTALLDIR_SBIN=$(DESTDIR)$(PREFIX)/sbin comedilib: subdirs