]> granicus.if.org Git - poly2tri-c/commitdiff
Add a basic build system using GNU autotools
authorBarak Itkin <lightningismyname@gmail.com>
Sat, 5 May 2012 09:54:40 +0000 (12:54 +0300)
committerBarak Itkin <lightningismyname@gmail.com>
Sat, 5 May 2012 09:55:49 +0000 (12:55 +0300)
.gitignore
Makefile.am [new file with mode: 0644]
bin/Makefile.am [new file with mode: 0644]
configure.ac [new file with mode: 0644]
p2t/Makefile.am [new file with mode: 0644]
p2t/common/Makefile.am [new file with mode: 0644]
p2t/sweep/Makefile.am [new file with mode: 0644]
refine/Makefile.am [new file with mode: 0644]
refine/utils.h [changed mode: 0755->0644]
render/Makefile.am [new file with mode: 0644]

index b962ae64728ece1c9b3ada4377ca6bf80a1ece87..a0ec01b96349b689dd9554399beec7480c7a9e3c 100644 (file)
@@ -1 +1,19 @@
 doxygen-doc
+*.la
+*.lo
+*.a
+*.o
+/*.config
+*Makefile
+*Makefile.in
+*.deps/
+/aclocal.m4
+/autom4te.cache
+/build-aux
+/config.cache
+/config.h
+/config.h.in
+/config.log
+/config.status
+/configure
+/stamp-h1
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..4ba4069
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = p2t refine render bin
diff --git a/bin/Makefile.am b/bin/Makefile.am
new file mode 100644 (file)
index 0000000..e7c2a2a
--- /dev/null
@@ -0,0 +1,2 @@
+bin_PROGRAMS = poly2tri-c-test
+poly2tri_c_test_SOURCES = main.c
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..ae35415
--- /dev/null
@@ -0,0 +1,40 @@
+# Declare the package details
+AC_INIT([poly2tri-c], [0.9], [lightningismyname@gmail.com])
+
+# Output the auxilary build scripts to a subdirectory
+AC_CONFIG_AUX_DIR([build-aux])
+
+# Relax some of the GNU requirements
+# Initialize Automake with the following settings:
+# Report all potential warnings and report all warnings as errors
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
+
+# Find a C compiler
+AC_PROG_CC
+
+# Find a library make
+AC_PROG_RANLIB
+
+# Find GLib support via pkg-config
+PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.28])
+
+CFLAGS="$CFLAGS $GLIB_CFLAGS"
+LDFLAGS="$LDFLAGS $GLIB_LIBS"
+LIBS="$LIBS $GLIB_LIBS"
+
+# Output this configuration header file
+AC_CONFIG_HEADERS([config.h])
+
+# Output these files
+AC_CONFIG_FILES([
+       bin/Makefile            \
+       p2t/sweep/Makefile      \
+       p2t/common/Makefile     \
+       p2t/Makefile            \
+       render/Makefile         \
+       refine/Makefile         \
+       Makefile                \
+       ])
+
+# Now really output
+AC_OUTPUT
diff --git a/p2t/Makefile.am b/p2t/Makefile.am
new file mode 100644 (file)
index 0000000..fa1726e
--- /dev/null
@@ -0,0 +1,5 @@
+SUBDIRS = sweep common
+lib_LIBRARIES = libp2t-c.a
+
+libp2t_c_a_LIBADD = common/libp2tcommon.a sweep/libp2tsweep.a
+libp2t_c_a_SOURCES =
diff --git a/p2t/common/Makefile.am b/p2t/common/Makefile.am
new file mode 100644 (file)
index 0000000..8ad238a
--- /dev/null
@@ -0,0 +1,2 @@
+noinst_LIBRARIES = libp2tcommon.a
+libp2tcommon_a_SOURCES = cutils.h poly2tri-private.h shapes.c shapes.h utils.c utils.h
diff --git a/p2t/sweep/Makefile.am b/p2t/sweep/Makefile.am
new file mode 100644 (file)
index 0000000..a5c3701
--- /dev/null
@@ -0,0 +1,2 @@
+noinst_LIBRARIES = libp2tsweep.a
+libp2tsweep_a_SOURCES = advancing_front.c advancing_front.h cdt.c cdt.h sweep.c sweep_context.c sweep_context.h sweep.h
diff --git a/refine/Makefile.am b/refine/Makefile.am
new file mode 100644 (file)
index 0000000..99341bb
--- /dev/null
@@ -0,0 +1,3 @@
+lib_LIBRARIES = libp2t-c-refine.a
+
+libp2t_c_refine_a_SOURCES = bounded-line.c bounded-line.h cdt.c cdt.h circle.c circle.h cluster.c cluster.h delaunay-terminator.c delaunay-terminator.h edge.c edge.h line.c line.h math.c math.h mesh.c mesh.h point.c point.h pslg.c pslg.h refine.h triangle.c triangle.h triangulation.h utils.c utils.h vector2.c vector2.h visibility.c visibility.h
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/render/Makefile.am b/render/Makefile.am
new file mode 100644 (file)
index 0000000..a035875
--- /dev/null
@@ -0,0 +1,3 @@
+lib_LIBRARIES = libp2t-c-render.a
+
+libp2t_c_render_a_SOURCES = mesh-render.c mesh-render.h svg-plot.c svg-plot.h