summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-12-13 00:44:17 +0100
committerGravatar Nikias Bassen2013-12-13 00:44:17 +0100
commita798afc8b5b00a43f4b121168e0419df2d398338 (patch)
treec178d7a149028944254511d03f91266ca43cfcbd /src
parent3b7647499474619b3e24bf01105b6b037887a0ed (diff)
downloadlibplist-a798afc8b5b00a43f4b121168e0419df2d398338.tar.gz
libplist-a798afc8b5b00a43f4b121168e0419df2d398338.tar.bz2
change build system to autotools
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt59
-rw-r--r--src/Makefile.am47
2 files changed, 47 insertions, 59 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
deleted file mode 100644
index c4f5483..0000000
--- a/src/CMakeLists.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-
-INCLUDE_DIRECTORIES( ${LIBXML2_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/libcnary/include )
-
-
-SET(libplist_SRC
- plist.c
- hashtable.c
- bytearray.c
- ptrarray.c
- bplist.c
- base64.c
- xplist.c )
-
-SET(libplist++_SRC
- Node.cpp
- Boolean.cpp
- Integer.cpp
- Real.cpp
- String.cpp
- Date.cpp
- Data.cpp
- Key.cpp
- Uid.cpp
- Structure.cpp
- Array.cpp
- Dictionary.cpp
- )
-
-SET(libcnary_object_files
- ${CMAKE_BINARY_DIR}/libcnary/CMakeFiles/libcnary.dir/iterator.c${CMAKE_C_OUTPUT_EXTENSION}
- ${CMAKE_BINARY_DIR}/libcnary/CMakeFiles/libcnary.dir/list.c${CMAKE_C_OUTPUT_EXTENSION}
- ${CMAKE_BINARY_DIR}/libcnary/CMakeFiles/libcnary.dir/node.c${CMAKE_C_OUTPUT_EXTENSION}
- ${CMAKE_BINARY_DIR}/libcnary/CMakeFiles/libcnary.dir/node_iterator.c${CMAKE_C_OUTPUT_EXTENSION}
- ${CMAKE_BINARY_DIR}/libcnary/CMakeFiles/libcnary.dir/node_list.c${CMAKE_C_OUTPUT_EXTENSION}
-)
-
-SET_SOURCE_FILES_PROPERTIES(${libcnary_object_files} PROPERTIES EXTERNAL_OBJECT true GENERATED true)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPLIST_BYTE_ORDER=${PLIST_BYTE_ORDER}")
-ADD_LIBRARY( plist SHARED ${libplist_SRC} ${libcnary_object_files} )
-TARGET_LINK_LIBRARIES( plist ${LIBXML2_LIBRARIES} )
-SET_TARGET_PROPERTIES( plist PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
-SET_TARGET_PROPERTIES( plist PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
-if(APPLE)
- SET_TARGET_PROPERTIES( plist PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
-endif()
-
-ADD_LIBRARY( plist++ SHARED ${libplist++_SRC} )
-TARGET_LINK_LIBRARIES( plist++ plist )
-SET_TARGET_PROPERTIES( plist++ PROPERTIES VERSION ${LIBPLIST_LIBVERSION} )
-SET_TARGET_PROPERTIES( plist++ PROPERTIES SOVERSION ${LIBPLIST_SOVERSION} )
-if(APPLE)
- SET_TARGET_PROPERTIES( plist++ PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
-endif()
-
-INSTALL(TARGETS plist plist++
- RUNTIME DESTINATION bin COMPONENT lib
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT dev)
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..16cf655
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,47 @@
+AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -I$(top_srcdir)/libcnary/include
+
+AM_CFLAGS = $(GLOBAL_CFLAGS) $(libxml2_CFLAGS)
+AM_LDFLAGS = $(libxml2_LIBS)
+
+lib_LTLIBRARIES = libplist.la libplist++.la
+libplist_la_LIBADD = $(top_srcdir)/libcnary/libcnary.la
+libplist_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPLIST_SO_VERSION) -no-undefined
+libplist_la_SOURCES = base64.c base64.h \
+ bytearray.c bytearray.h \
+ hashtable.c hashtable.h \
+ ptrarray.c ptrarray.h \
+ xplist.c xplist.h \
+ bplist.c bplist.h \
+ plist.c plist.h \
+ common.h
+
+libplist___la_LIBADD = libplist.la
+libplist___la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPLIST_SO_VERSION) -no-undefined
+libplist___la_SOURCES = Node.cpp \
+ Structure.cpp \
+ Array.cpp \
+ Boolean.cpp \
+ Data.cpp \
+ Date.cpp \
+ Dictionary.cpp \
+ Integer.cpp \
+ Key.cpp \
+ Real.cpp \
+ String.cpp \
+ Uid.cpp \
+ $(top_srcdir)/include/plist/Node.h \
+ $(top_srcdir)/include/plist/Structure.h \
+ $(top_srcdir)/include/plist/Array.h \
+ $(top_srcdir)/include/plist/Boolean.h \
+ $(top_srcdir)/include/plist/Data.h \
+ $(top_srcdir)/include/plist/Date.h \
+ $(top_srcdir)/include/plist/Dictionary.h \
+ $(top_srcdir)/include/plist/Integer.h \
+ $(top_srcdir)/include/plist/Key.h \
+ $(top_srcdir)/include/plist/Real.h \
+ $(top_srcdir)/include/plist/String.h \
+ $(top_srcdir)/include/plist/Uid.h
+
+if WIN32
+libplist_la_LDFLAGS += -avoid-version
+endif