Checksum plugins only for components we actually build
authorMartin Willi <martin@revosec.ch>
Wed, 25 May 2011 08:33:14 +0000 (10:33 +0200)
committerMartin Willi <martin@revosec.ch>
Wed, 25 May 2011 08:33:14 +0000 (10:33 +0200)
src/checksum/Makefile.am
src/checksum/checksum_builder.c

index 3aded1d..f385194 100644 (file)
@@ -15,24 +15,24 @@ BUILT_SOURCES = checksum.c
 CLEANFILES = checksum.c
 INCLUDES = -I$(top_srcdir)/src/libstrongswan
 AM_CFLAGS = -rdynamic \
-       -DS_PLUGINS=\""${s_plugins}\"" -DS_PATH=\""${top_builddir}/src/libstrongswan/plugins\"" \
-       -DH_PLUGINS=\""${h_plugins}\"" -DH_PATH=\""${top_builddir}/src/libhydra/plugins\"" \
-       -DP_PLUGINS=\""${p_plugins}\"" -DP_PATH=\""${top_builddir}/src/pluto/plugins\"" \
-       -DC_PLUGINS=\""${c_plugins}\"" -DC_PATH=\""${top_builddir}/src/libcharon/plugins\""
+       -DS_PLUGINS=\""${s_plugins}\"" -DS_PATH=\""${top_builddir}/src/libstrongswan/plugins\""
 
 libs = $(top_builddir)/src/libstrongswan/.libs/libstrongswan.so
 
 if USE_LIBHYDRA
   libs += $(top_builddir)/src/libhydra/.libs/libhydra.so
+  AM_CFLAGS += -DH_PLUGINS=\""${h_plugins}\"" -DH_PATH=\""${top_builddir}/src/libhydra/plugins\""
 endif
 
 if USE_CHARON
   libs += $(top_builddir)/src/libcharon/.libs/libcharon.so
   libs += $(top_builddir)/src/charon/.libs/charon
+  AM_CFLAGS += -DC_PLUGINS=\""${c_plugins}\"" -DC_PATH=\""${top_builddir}/src/libcharon/plugins\""
 endif
 
 if USE_PLUTO
   libs += $(top_builddir)/src/pluto/.libs/pluto
+  AM_CFLAGS += -DP_PLUGINS=\""${p_plugins}\"" -DP_PATH=\""${top_builddir}/src/pluto/plugins\""
 endif
 
 if USE_TOOLS
index dc1de99..b1ed0b5 100644 (file)
@@ -149,9 +149,15 @@ int main(int argc, char* argv[])
                build_binary_checksum(argv[i]);
        }
        build_plugin_checksums(S_PLUGINS, S_PATH);
+#ifdef H_PLUGINS
        build_plugin_checksums(H_PLUGINS, H_PATH);
+#endif
+#ifdef P_PLUGINS
        build_plugin_checksums(P_PLUGINS, P_PATH);
+#endif
+#ifdef C_PLUGINS
        build_plugin_checksums(C_PLUGINS, C_PATH);
+#endif
 
        printf("};\n");
        printf("\n");