Common.mk overrides local makeifle's PDCFLAGS

Hi!

(SDK version 1.10)

c.f. Pdc: Would like to suppress "Unrecognized file types" warning - #3 by markd where I wanted a way to turn off warnings. Turns out there's a -q flag for PDC. YAY.

Unfortunately, if in my makefile, I set PDCFLAGS

PDCFLAGS = -q
include $(SDK)/C_API/buildsupport/common.mk

It doesn't survive

/Users/markd/Developer/PlaydateSDK/bin/pdc  Source Sampler.pdx
Unrecognized file types are copied by default. Use the -k or --skip-unkno\
wn flag to skip these files instead.
Copying patterns/basket-weave.pattern

Turns out common.mk overwrites PDCFLAGS:

ifeq ($(detected_OS), Darwin)
  CLANGFLAGS = -g
  SIMCOMPILER = clang $(CLANGFLAGS)
  DYLIB_FLAGS = -dynamiclib -rdynamic
  DYLIB_EXT = dylib
  PDCFLAGS=

If I comment out that last line, then my makefile's PDCFLAGS make it through.

Thanks!
++md

1 Like

Bumping this - I'm needing to hand-edit common.mk in every new version to quiet a warning.

Here's the diff for Developer/PlaydateSDK/C_API/buildsupport/common.mk

20d19
<   PDCFLAGS=

Have you tried setting PCDFLAGS after including common.mk?

something like:

include $(SDK)/C_API/buildsupport/common.mk
PCDFLAGS += -q

Since the variable is set using = and not := it should be resolved when the build rule is used and not when the file is parsed.

AWESOME! Thank you so much. That's perfect.