0

Attention AutoMake experts... ;)
What is the "proper" way of using certain source files in multiple binaries?
I have a client and a server, and there are some "shared" source files (parse.c/parse.h and message.c/message.h). And of course I have to binaries listed (bin_PROGRAMS = client server). So where in the Makefile.am should parse.c/h and message.c/h be? Listed twice, once in the client's sources and once in the server's sources?

BenjiWiebe
  • 2,116
  • 5
  • 22
  • 41
  • 3
    There are several "proper" ways to do it. As you suggest, listing each file in `client_SOURCES` and in `server_SOURCES` is fine. Or us a convenience library. Or install a stand-alone library. Take your pick. – William Pursell Oct 30 '12 at 19:51
  • Thanks, I just thought there might be some other, better, way to do it. – BenjiWiebe Oct 30 '12 at 21:03

1 Answers1

0

The way I did it, was put the .h files in question in EXTRA_DIST and the .c files in both server_SOURCES and client_SOURCES. Not sure if that is the best way to do it, but it works.

BenjiWiebe
  • 2,116
  • 5
  • 22
  • 41