aboutsummaryrefslogtreecommitdiffstats
path: root/mk/Variables.mk
diff options
context:
space:
mode:
authorkraxel <kraxel>2005-02-09 11:49:57 +0000
committerkraxel <kraxel>2005-02-09 11:49:57 +0000
commit65b4d6491a2fcd32efe5b0cacf137305af95b541 (patch)
tree02902d70eca9938000f4b4f97793fa6c4423be24 /mk/Variables.mk
parent73671a2f4f0e6e03a509ff5a97ab70d7b0db12b1 (diff)
downloadscsi-changer-65b4d6491a2fcd32efe5b0cacf137305af95b541.tar.gz
- add/update files.
Diffstat (limited to 'mk/Variables.mk')
-rw-r--r--mk/Variables.mk46
1 files changed, 46 insertions, 0 deletions
diff --git a/mk/Variables.mk b/mk/Variables.mk
new file mode 100644
index 0000000..930f824
--- /dev/null
+++ b/mk/Variables.mk
@@ -0,0 +1,46 @@
+# common variables ...
+########################################################################
+
+# directories
+DESTDIR =
+srcdir ?= .
+prefix ?= /usr/local
+bindir = $(DESTDIR)$(prefix)/bin
+mandir = $(DESTDIR)$(prefix)/share/man
+locdir = $(DESTDIR)$(prefix)/share/locale
+
+# package + version
+empty :=
+space := $(empty) $(empty)
+ifneq ($(wildcard $(srcdir)/VERSION),)
+ VERSION := $(shell cat $(srcdir)/VERSION)
+else
+ VERSION := 42
+endif
+
+# programs
+CC ?= gcc
+CXX ?= g++
+MOC ?= $(if $(QTDIR),$(QTDIR)/bin/moc,moc)
+INSTALL ?= install
+INSTALL_BINARY := $(INSTALL) -s
+INSTALL_SCRIPT := $(INSTALL)
+INSTALL_DATA := $(INSTALL) -m 644
+INSTALL_DIR := $(INSTALL) -d
+
+# cflags
+CFLAGS ?= -g -O2
+CFLAGS += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+ -Wpointer-arith -Wunused
+
+# add /usr/local to the search path if something is in there ...
+ifneq ($(wildcard /usr/local/include/*.h),)
+ CFLAGS += -I/usr/local/include
+ LDFLAGS += -L/usr/local/$(LIB)
+endif
+
+# fixup include path for $(srcdir) != "."
+ifneq ($(srcdir),.)
+ CFLAGS += -I. -I$(srcdir)
+endif
+