Skip to content

Have cpp files depend on same named include files.#2

Open
KOGrover wants to merge 1 commit intoMarkoPaul0:masterfrom
KOGrover:makefile-depend-h
Open

Have cpp files depend on same named include files.#2
KOGrover wants to merge 1 commit intoMarkoPaul0:masterfrom
KOGrover:makefile-depend-h

Conversation

@KOGrover
Copy link

I noticed that the code was not re-built if just an include file changed.

The build logic could likely be improved. E.g. use target dependent variables and have a 'debug' target. It would be more intuitive than setting BUILD_MODE to 'dbg'. It would also also you to build release and debug code in one make invocation.

....
CXXFLAGS = -g3 -gdwarf2
CCFLAGS = -g3 -gdwarf2

all: executable

debug: CXXFLAGS += -DDEBUG -g
debug: CCFLAGS += -DDEBUG -g
debug: executable
....

I can work on that if you have an interest.
I'm not really a C++ programmer, so I would need to research what current best practices are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant