$(if $(NAME),,$(error NAME not specified for target))
$(if $(SOURCES),,$(error SOURCES not specified for target))
-# FIXME: hack, should check for the "install" target and not include
-# it then instead of by the name
-ifeq ($(NAME),jscorebus)
-include build/pkgconfig.mk
-endif
CONFIGFLAGS := $(if $(CONFIG),-include $(CONFIG),)
GENERICFLAGS := $(CPPFLAGS) $(CONFIGFLAGS) $(CFLAGS) -c -MD
-include $(SOURCES:%=$(O)/obj/%.d)
-$(OBJECTS) $(PIC_OBJECTS): $(CONFIG)
+$(OBJECTS) $(PIC_OBJECTS): pkg-check $(CONFIG)