[hipl-dev] Re: [Merge] lp:~hipl-core/hipl/libhip into lp:hipl

  • From: Xin Gu <eric.nevup@xxxxxxxxx>
  • To: hipl-dev@xxxxxxxxxxxxx
  • Date: Wed, 15 Feb 2012 16:03:24 +0200

On 13/02/12 13:33, Diego Biurrun wrote:
And that was a *huge* bug that you amplified a hundredfold in this
merge request.  Fixed.  hipfw does not and must not depend on hipd
code.  Your build system changes must reflect this and you must not
make hipfw depend on hipd with "autotools" handwaving.



The diff result below shows one approach I find for this issue.
The idea is building midauth_builder.c into an intermediate lib and later linking it to both libhipdaemon.la and hipfw.
Do you think it is ok?

=== modified file 'Makefile.am'
--- Makefile.am    2012-02-12 20:20:06 +0000
+++ Makefile.am    2012-02-15 13:53:36 +0000
@@ -66,6 +66,7 @@
 ### libraries ###
 lib_LTLIBRARIES = lib/core/libhipcore.la
 lib_LTLIBRARIES += lib/hipdaemon/libhipdaemon.la
+noinst_LTLIBRARIES = libmidauthbuilder.la


 ### tests ###
@@ -208,7 +209,6 @@
lib/hipdaemon/user_ipsec_sadb_api.c \ modules/heartbeat/hipd/heartbeat.c \ modules/heartbeat_update/hipd/hb_update.c \ - modules/midauth/lib/midauth_builder.c \ modules/update/hipd/update.c \ modules/update/hipd/update_builder.c \ modules/update/hipd/update_locator.c \
@@ -217,7 +217,10 @@
lib_hipdaemon_libhipdaemon_la_SOURCES = $(lib_hipdaemon_libhipdaemon_la_sources) \
                                         modules/midauth/hipd/midauth.c

-lib_hipdaemon_libhipdaemon_la_LIBADD  = lib/core/libhipcore.la
+libmidauthbuilder_la_SOURCES = modules/midauth/lib/midauth_builder.c
+
+lib_hipdaemon_libhipdaemon_la_LIBADD  = lib/core/libhipcore.la          \
+                                        libmidauthbuilder.la

 test_check_hipd_SOURCES     = test/check_hipd.c                         \
                               test/hipd/lsidb.c
@@ -255,7 +258,8 @@
 ### static library dependencies ###

 hipd_hipd_LDADD                          = lib/hipdaemon/libhipdaemon.la
-hipfw_hipfw_LDADD                        = lib/hipdaemon/libhipdaemon.la
+hipfw_hipfw_LDADD                        = lib/core/libhipcore.la       \
+                                           libmidauthbuilder.la
 test_auth_performance_LDADD              = lib/core/libhipcore.la
 test_check_hipd_LDADD                    = lib/hipdaemon/libhipdaemon.la
 test_check_hipfw_LDADD                   = lib/hipdaemon/libhipdaemon.la


Xin

Other related posts: