Commit 15d042e22769bd8c8aeb394277981960984b4f0a
1 parent
fdc7521f
Major changes to the build system
- move modbus.h => include/modbus/ - create a pkgconfig file (module.pc) - install modbus.h in $(includedir) - new path to reach modbus.h
Showing
10 changed files
with
38 additions
and
14 deletions
Makefile.am
configure.ac
| ... | ... | @@ -12,6 +12,9 @@ AC_PROG_LIBTOOL |
| 12 | 12 | |
| 13 | 13 | # Checks for libraries. |
| 14 | 14 | AM_PATH_GLIB_2_0(2.0.0,,AC_MSG_ERROR(libmodbus needs GLib 2.X)) |
| 15 | +PKG_CHECK_MODULES(GLIB, glib-2.0) | |
| 16 | +AC_SUBST(GLIB_CFLAGS) | |
| 17 | +AC_SUBST(GLIB_LIBS) | |
| 15 | 18 | |
| 16 | 19 | # Checks for header files. |
| 17 | 20 | AC_HEADER_STDC |
| ... | ... | @@ -27,8 +30,11 @@ AC_FUNC_MALLOC |
| 27 | 30 | AC_FUNC_SELECT_ARGTYPES |
| 28 | 31 | AC_CHECK_FUNCS([inet_ntoa memset select socket]) |
| 29 | 32 | |
| 30 | -AC_CONFIG_FILES([ | |
| 31 | - Makefile | |
| 32 | - src/Makefile | |
| 33 | - ]) | |
| 34 | -AC_OUTPUT | |
| 33 | +AC_OUTPUT([ | |
| 34 | +Makefile | |
| 35 | +src/Makefile | |
| 36 | +include/Makefile | |
| 37 | +include/modbus/Makefile | |
| 38 | +modbus.pc | |
| 39 | +]) | |
| 40 | + | ... | ... |
include/Makefile.am
0 → 100644
include/modbus/Makefile.am
0 → 100644
src/modbus.h renamed to include/modbus/modbus.h
modbus.pc.in
0 → 100644
src/Makefile.am
| ... | ... | @@ -10,10 +10,6 @@ test_modbus_slave_SOURCES = test-modbus-slave.c |
| 10 | 10 | test_modbus_slave_INCLUDES = @GLIB_CFLAGS@ |
| 11 | 11 | test_modbus_slave_LDADD = libmodbus.la @GLIB_LIBS@ |
| 12 | 12 | |
| 13 | -INCLUDES = @GLIB_CFLAGS@ | |
| 13 | +INCLUDES = @GLIB_CFLAGS@ -I$(top_srcdir)/include | |
| 14 | 14 | LDADD = @GLIB_LIBS@ |
| 15 | 15 | CLEANFILES = *~ |
| 16 | - | |
| 17 | -# Include files to install | |
| 18 | -libmodbusincludedir = $(includedir)/libmodbus | |
| 19 | -libmodbusinclude_HEADERS = modbus.h | ... | ... |
src/modbus.c
src/test-modbus-master.c