/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2019-11-21 19:30:47 UTC
  • mto: This revision was merged to the branch mainline in revision 396.
  • Revision ID: teddy@recompile.se-20191121193047-nszsowvqcvk081p2
Makefile: Use target-specific variables

Instead of overriding a whole rule and invoking $(LINK.c) explicitly
for certain targets (in order to append special compilation flags),
set CFLAGS and LDLIBS as target-specific variables on those targets.

* Makefile (plugins.d/mandos-client): Replace with a target-specific
  variable setting.
  (plugin-helpers/mandos-client-iprouteadddel): - ''-
  (dracut-module/password-agent): - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
282
282
                $@)
283
283
 
284
284
# Need to add the GnuTLS, Avahi and GPGME libraries
285
 
plugins.d/mandos-client: plugins.d/mandos-client.c
286
 
        $(LINK.c) $^ $(GNUTLS_CFLAGS) $(AVAHI_CFLAGS) $(strip\
287
 
                ) $(GPGME_CFLAGS) $(GNUTLS_LIBS) $(strip\
288
 
                ) $(AVAHI_LIBS) $(GPGME_LIBS) $(LOADLIBES) $(strip\
289
 
                ) $(LDLIBS) -o $@
 
285
plugins.d/mandos-client: CFLAGS += $(GNUTLS_CFLAGS) $(strip \
 
286
        ) $(AVAHI_CFLAGS) $(GPGME_CFLAGS)
 
287
plugins.d/mandos-client: LDLIBS += $(GNUTLS_LIBS) $(strip \
 
288
        ) $(AVAHI_LIBS) $(GPGME_LIBS)
290
289
 
291
290
# Need to add the libnl-route library
292
 
plugin-helpers/mandos-client-iprouteadddel: plugin-helpers/mandos-client-iprouteadddel.c
293
 
        $(LINK.c) $(LIBNL3_CFLAGS) $^ $(LIBNL3_LIBS) $(strip\
294
 
                ) $(LOADLIBES) $(LDLIBS) -o $@
 
291
plugin-helpers/mandos-client-iprouteadddel: CFLAGS += $(LIBNL3_CFLAGS)
 
292
plugin-helpers/mandos-client-iprouteadddel: LDLIBS += $(LIBNL3_LIBS)
295
293
 
296
294
# Need to add the GLib and pthread libraries
297
 
dracut-module/password-agent: dracut-module/password-agent.c
298
 
        $(LINK.c) $(GLIB_CFLAGS) $^ $(GLIB_LIBS) -lpthread $(strip\
299
 
                ) $(LOADLIBES) $(LDLIBS) -o $@
 
295
dracut-module/password-agent: CFLAGS += $(GLIB_CFLAGS)
 
296
dracut-module/password-agent: LDLIBS += $(GLIB_LIBS) -lpthread
300
297
 
301
298
.PHONY : all doc html clean distclean mostlyclean maintainer-clean \
302
299
        check run-client run-server install install-html \