openndr / ndr-build-env

NDR Build Environment Component
https://openndr.org
Other
0 stars 2 forks source link

In static library build, header files must be placed in $INCPATH. Not $MK_INCPATH. #10

Closed Revimal closed 6 years ago

Revimal commented 6 years ago

According to 'ndr.lib.mk', header files will place in $MK_INCPATH.

$(HDRS):
    @cp -f $(SRCDIR)/$@ $(NBE_MK_INCPATH)

$(EXTOBJS):
    $(eval LNKLIST += $(wildcard  $(NBE_MK_OBJPATH)/$@/*.o))

$(INCHDR):
    @cp -f $(SRCDIR)/$@ $(NBE_INCPATH)/$(LIB).h

$(SRCS)::
    @gcc -c $(SRCDIR)/$@ -I$(NBE_INCPATH) -I$(NBE_MK_INCPATH) $(CFLAGS) $(EXTRA_CFLAGS)
    @cp -f $(basename $@).o $(NBE_MK_LOBJPATH)
$(eval LNKLIST += $(basename $@).o)

But, header files of static library must be accessible to external build process. We must change the target directory of static-libs' header files to $INCPATH.