MORE_CFLAGS=$(shell pkg-config --cflags smf glib-2.0) MORE_LIBS=$(shell pkg-config --libs smf glib-2.0) TARGET=plsmf SOBJ=$(PACKSODIR)/$(TARGET).$(SOEXT) CFLAGS+=$(MORE_CFLAGS) LIBS+=$(MORE_LIBS) ifeq ($(SWIARCH), arm64-darwin) # On Mac OS, CC and LD were set to cc binary in Xcode directory tree, which # prevents inclusion of system include directories. This work around calls cc via # /usr/bin/cc, which adds the missing include paths implicitly. CC=/usr/bin/cc LD=/usr/bin/cc endif all: $(SOBJ) $(SOBJ): c/$(TARGET).o mkdir -p $(PACKSODIR) $(LD) $(LDSOFLAGS) -o $@ $(SWISOLIB) $< $(LIBS) strip -x $@ check:: install:: clean: rm -f c/$(TARGET).o distclean: clean rm -f $(SOBJ) install-me: swipl -f none -g "pack_install(.,[upgrade(true), interactive(false)]), halt"