Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use autotools as buildsystem #1

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
migrated to autotools
  • Loading branch information
tbe committed May 9, 2015
commit c954c1763381ce850d4a7816d646d3037902b783
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/autom4te.cache/
/config/
Makefile
Makefile.in
aclocal.m4
app.info
compile
config.guess
config.h
config.h.in
config.log
config.status
config.sub
configure
configure.scan
coverage_report
depcomp
install-sh
INSTALL
libtool
ltmain.sh
m4
missing
stamp-h1
*~
*.html
*.log
*.o
*.la
*.so*
*.a
.deps
*.tar*
*.zip
*.lo
*.gcno
*.gcda
File renamed without changes.
Empty file added ChangeLog
Empty file.
36 changes: 0 additions & 36 deletions INSTALL

This file was deleted.

22 changes: 0 additions & 22 deletions Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SUBDIRS = wiringPi devLib gpio

# pkg-config files
pkgconfiglibdir = $(libdir)/pkgconfig
pkgconfiglib_DATA = wiringPiDev.pc wiringPi.pc
Empty file added NEWS
Empty file.
File renamed without changes.
65 changes: 65 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])

AC_INIT([wiringPi], [2.0.0], [http://wiringpi.com/])

# versions for the libraries
AC_SUBST(libwiringPi_la_version, 2:0:0)
AC_SUBST(libwiringPiDev_la_version, 2:0:0)

# install locations for headers
AC_SUBST(includedir,"${includedir}/wiringPi")

AC_CONFIG_MACRO_DIR([m4])

LT_INIT([disable-static])
AM_INIT_AUTOMAKE([1.9])


AC_CONFIG_SRCDIR([devLib/ds1302.c])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET

# Checks for libraries.
AC_CHECK_LIB([m], [round])
AC_CHECK_LIB([pthread], [pthread_create])

# Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h sys/ioctl.h sys/time.h termios.h unistd.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT32_T
AC_TYPE_INT8_T
AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_CHOWN
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MMAP
AC_CHECK_FUNCS([floor gettimeofday memset rint strcasecmp strerror strtol strtoul])

AC_CONFIG_FILES([Makefile
devLib/Makefile
examples/Gertboard/Makefile
examples/Makefile
examples/PiFace/Makefile
examples/PiGlow/Makefile
examples/q2w/Makefile
gpio/Makefile
wiringPi/Makefile
wiringPi.pc
wiringPiDev.pc])
AC_OUTPUT
134 changes: 0 additions & 134 deletions devLib/Makefile

This file was deleted.

26 changes: 26 additions & 0 deletions devLib/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
AM_CPPFLAGS = -I$(top_srcdir)/wiringPi

# headers
include_HEADERS = \
ds1302.h \
maxdetect.h \
gertboard.h \
piFace.h \
lcd128x64.h \
lcd.h \
piNes.h \
piGlow.h

# wiringPiDev.{so,a}
lib_LTLIBRARIES = libwiringPiDev.la
libwiringPiDev_la_LDFLAGS = -version-info $(libwiringPiDev_la_version)
libwiringPiDev_la_LIBADD = $(top_builddir)/wiringPi/libwiringPi.la
libwiringPiDev_la_SOURCES = \
ds1302.c \
maxdetect.c \
gertboard.c \
piFace.c \
lcd128x64.c \
lcd.c \
piNes.c \
piGlow.c
Loading