0
votes

is it possible to not generate the Makerules from Makefile.am, but include the Makerules from a predefined sub.mk?

Well, I have a big Makefile-Project i want to build a custom App for.
Building an App for this project is done with a Makefile in the following structure:

PROJDIR ?= ../..

TARGET  = myApp

SRC_C   = main.c

include $(PROJDIR)/prog.mk

The actual makerules are hidden somewhere in prog.mk which requires the variables TARGET, SRC_C etc.

Now, i want to use an independent Automake project to generate the Makefile of my App.

Is it even possible to let Makefile.am generate a Makefile like the one above?
Can someone provide an example for this?

1

1 Answers

0
votes

No, automake by design is not going to generate anything close to that, since it's a full stack to define your targets and it'll take care of building them.

You can use autoconf alone, by writing a template Makefile.in and have it substitute the variables you figure out at ./configure time, but that means you're essentially on your own to write the structure.