Browse files

Windows dll support

  • Loading branch information...
1 parent 401648c commit ff8f6dbba19f5da1c6967587845f16a7107d458f @ejholmes committed Jun 17, 2011
Showing with 5 additions and 12 deletions.
  1. +2 −1 Makefile.am
  2. +3 −11 configure.ac
View
3 Makefile.am
@@ -2,4 +2,5 @@ lib_LTLIBRARIES = libopenfocus.la
libopenfocus_la_CPPFLAGS = $(libsub_CFLAGS)
libopenfocus_la_LIBADD = $(libusb_LIBS)
libopenfocus_la_SOURCES = device.cpp bootloader.cpp cdevice.cpp intelhex.cpp helper.cpp
-include_HEADERS = openfocus.h intelhex.h
+libopenfocus_la_LDFLAGS = -no-undefined -version-info 0:0:0
+include_HEADERS = openfocus.h intelhex.h util.h
View
14 configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT([LibOpenFocus], [0.1], [eric@ejholmes.net])
-AC_CONFIG_HEADERS([config.h])
+# AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
LT_INIT
@@ -12,18 +12,10 @@ AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CPP
+AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
-# Checks for libraries.
-# AM_CONDITIONAL([LIBUSB_CONFIG], [which libusb-config])
-# AM_COND_IF([LIBUSB_CONFIG],[
- # [CFLAGS = `libusb-config --cflags`]
- # [LIBS = `libsub-config --libs`]
- # ],[
- # AC_CHECK_LIB([usb], [usb_init],,[AC_MSG_ERROR[libusb not found]])
- # AC_CHECK_HEADERS([usb.h],,[AC_MSG_ERROR[usb.h not found]])
- # ]
-# )
+# Check for libusb
PKG_CHECK_MODULES([libusb], [libusb],,[
AC_CHECK_LIB([usb], [usb_init],,[AC_MSG_ERROR[libusb not found]])
AC_CHECK_HEADERS([usb.h],,[AC_MSG_ERROR[usb.h not found]])

0 comments on commit ff8f6db

Please sign in to comment.