tibia/templates/vst3-make/Makefile

28 lines
690 B
Makefile

include vars.mk
CC = gcc
CFLAGS = -fPIC -Wall -Wpedantic -Wextra -Wno-unused-parameter
LDFLAGS = -shared -lm
BUNDLE_DIR = ${BUNDLE_NAME}.vst3
SO_DIR = $(shell uname -m)-linux
SO_FILE = ${SO_DIR}/${BUNDLE_NAME}.so
all: build/${BUNDLE_DIR}/Contents/Info.plist build/${BUNDLE_DIR}/Contents/${SO_FILE}
build/${BUNDLE_DIR}/Contents/Info.plist: data/Info.plist | build/${BUNDLE_DIR}/Contents
cp $^ $@
build/${BUNDLE_DIR}/Contents/${SO_FILE}: src/vst3.c | build/${BUNDLE_DIR}/Contents/${SO_DIR}
${CC} $^ -o $@ ${CFLAGS} ${CFLAGS_EXTRA} ${LDFLAGS} ${LDFLAGS_EXTRA}
build/${BUNDLE_DIR}/Contents build/${BUNDLE_DIR}/Contents/${SO_DIR}:
mkdir -p $@
clean:
rm -fr build
.PHONY: all clean