AM_CPPFLAGS = -I$(top_srcdir)
+# Enable more compiler warnings.
+AM_CFLAGS = -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow
+
lib_LTLIBRARIES = libserialport.la
libserialport_la_SOURCES = serialport.c libserialport_internal.h
endif
libserialport_la_LIBADD = $(LIBOBJS)
-
-libserialport_la_LDFLAGS = $(SP_LIB_LDFLAGS) -no-undefined
-
if WIN32
libserialport_la_LIBADD += $(SP_LIBS)
endif
+libserialport_la_LDFLAGS = $(SP_LIB_LDFLAGS) -no-undefined
+if MACOSX
+libserialport_la_LDFLAGS += -framework IOKit -framework CoreFoundation
+endif
+
library_includedir = $(includedir)
library_include_HEADERS = libserialport.h
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-# Enable more compiler warnings.
-CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -pedantic -Wmissing-prototypes -Wshadow"
-
# Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AM_CONDITIONAL([WIN32], false)
AM_CONDITIONAL([MACOSX], true)
AM_CONDITIONAL([FREEBSD], false)
- LDFLAGS="$LDFLAGS -Wl,-framework -Wl,IOKit -Wl,-framework -Wl,CoreFoundation"
AC_CHECK_HEADER(IOKit/IOKitLib.h, [], [AC_MSG_ERROR([IOKit/IOKitLib.h not found])])
;;
mingw* | cygwin*)