Permalink
Browse files

Add Autotools build system

  • Loading branch information...
1 parent 3c3bb3f commit 5ede0802e5aa55ef9e69fd0528b6963ba2efeb14 @codebrainz committed Nov 21, 2011
View
@@ -1,2 +1,10 @@
-*.[ao]
-digimag
+*.o
+Makefile
+Makefile.in
+/aclocal.m4
+/autom4te.cache/
+/build-aux/
+/config.*
+/configure
+/src/digimag
+.deps/
View
@@ -1,11 +0,0 @@
-#
-# Makefile for systems with pkg-config
-#
-
-PKG_FLAGS = `pkg-config --cflags --libs opencv`
-
-digimag: main.c ini.c config.c
- $(CC) $(CFLAGS) $(LDFLAGS) $(PKG_FLAGS) $^ -o $@
-
-clean:
- rm -f digimag
View
@@ -0,0 +1 @@
+SUBDIRS = src
View
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+mkdir -p build-aux || exit 1
+autoreconf -vfi || exit 2
+echo "Build system ready, type './configure' to configure it."
+exit 0
View
@@ -0,0 +1,18 @@
+AC_PREREQ([2.67])
+AC_INIT([digimag], [1.0], [mbrush@codebrainz.ca])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE([foreign silent-rules])
+AM_SILENT_RULES([yes])
+
+AC_PROG_CC
+
+AC_CHECK_HEADERS(ctype.h errno.h libgen.h stdio.h string.h sys/stat.h)
+
+PKG_CHECK_MODULES([OPENCV], [opencv >= 2.3])
+
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+])
+AC_OUTPUT
File renamed without changes.
View
@@ -0,0 +1,5 @@
+bin_PROGRAMS = digimag
+
+digimag_SOURCES = main.c config.c config.h ini.c ini.h
+digimag_CPPFLAGS = @OPENCV_CFLAGS@
+digimag_LDADD = @OPENCV_LIBS@
File renamed without changes.
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.
View
File renamed without changes.

0 comments on commit 5ede080

Please sign in to comment.