Makefile.am 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. if !ENABLE_MSVC_ONLY
  2. if !DISABLE_EXECUTABLES
  3. bin_PROGRAMS = sgen-grep-binprot
  4. endif
  5. AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
  6. glib_libs = $(top_builddir)/mono/eglib/libeglib.la
  7. noinst_LIBRARIES = libsgen-grep-binprot.a libsgen-grep-binprot32p.a libsgen-grep-binprot64p.a
  8. # Main is in a library so it can be C++.
  9. noinst_LIBRARIES += libmain.a
  10. endif # !ENABLE_MSVC_ONLY
  11. # Default to C so the executable is linked as C and does not use libstdc++.
  12. # Also the -xc++ flag mishandles .o and .a files.
  13. CFLAGS = $(filter-out @CXX_REMOVE_CFLAGS@, @CFLAGS@)
  14. if !ENABLE_MSVC_ONLY
  15. # Libraries are C++ if enabled.
  16. libmain_a_CFLAGS = @CXX_ADD_CFLAGS@
  17. libsgen_grep_binprot_a_CFLAGS = @CXX_ADD_CFLAGS@
  18. libsgen_grep_binprot32p_a_CFLAGS = @CXX_ADD_CFLAGS@
  19. libsgen_grep_binprot64p_a_CFLAGS = @CXX_ADD_CFLAGS@
  20. libsgen_grep_binprot_a_SOURCES = sgen-grep-binprot.c sgen-grep-binprot.h
  21. libsgen_grep_binprot_a_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
  22. libsgen_grep_binprot32p_a_SOURCES = sgen-grep-binprot.c sgen-grep-binprot.h
  23. libsgen_grep_binprot32p_a_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -DBINPROT_SIZEOF_VOID_P=4 -DBINPROT_HAS_HEADER
  24. libsgen_grep_binprot64p_a_SOURCES = sgen-grep-binprot.c sgen-grep-binprot.h
  25. libsgen_grep_binprot64p_a_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -DBINPROT_SIZEOF_VOID_P=8 -DBINPROT_HAS_HEADER
  26. # Executable has no source files, just links to object files and libraries.
  27. sgen_grep_binprot_SOURCES =
  28. libmain_a_SOURCES = \
  29. sgen-grep-binprot-main.c \
  30. sgen-entry-stream.c \
  31. sgen-entry-stream.h
  32. # Link to the libmain object files instead of library for higher fidelity with old behavior.
  33. sgen_grep_binprot_LDADD = \
  34. libmain_a-sgen-grep-binprot-main.$(OBJEXT) \
  35. libmain_a-sgen-entry-stream.$(OBJEXT) \
  36. $(glib_libs) libsgen-grep-binprot.a libsgen-grep-binprot32p.a libsgen-grep-binprot64p.a
  37. endif # !ENABLE_MSVC_ONLY