ConnectivityFoundry / AwaLWM2M

Awa LWM2M is an implementation of the OMA Lightweight M2M protocol in C.
BSD 3-Clause "New" or "Revised" License
102 stars 66 forks source link

[Proposal] : Makefile re-design #353

Open boyvinall opened 7 years ago

boyvinall commented 7 years ago

As we start using Awa in a greater variety of RTOS etc, it feels to me like there are some pain-points around Makefiles at the moment. The "main" makefiles are using cmake, but other systems (contiki, RIOT) are not. The result is that we have the same source files being built in different ways by different makefiles. I think it's important to have single make structure that can build the code in all the different ways required. For me, I think this probably means not using cmake - see comments on #346.

Other considerations here:

  1. making it easy to build only the bits needed for a particular platform - again, see #346, building only the static client.
  2. supporting build of multiple configurations in the same build phase - combinations of coap, DTLS library etc. This helps to support CI processes. I'd like to be able to output a bunch of (small) docker containers, each with a different build configuration, so that we can push these to docker hub. There will obviously be non-docker outputs as well though .. ideally pre-built libraries for different RTOS/CPUs and maybe some ipkg and/or similar too.
  3. slightly aside, but being able to use an erbium (or other dependencies) built outside of the Awa repo. This is currently slightly broken due to some erbium changes which were done to support the coap abstractions. But, in the longer term view, it would be easier to get Awa upstreamed into some projects if we didn't require our own specially-crafted version of dependencies, and could integrate with other build systems easily.

I just wanted to get some thoughts from others in the project to see if we have some agreement on this. @DavidAntliff, @datachi7d - interested by your thoughts in particular, but also from anyone else.

I'm happy to take this on. I am pretty heavily loaded, but I can probably find some time to do this .. I don't actually think it would take too long to do - possibly optimistic, but I don't think it'd take more than a man-week, so it's just trying to schedule the elapsed time efficiently.