Makefile

Thu, 04 Feb 2016 17:21:33 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Thu, 04 Feb 2016 17:21:33 +0000
changeset 75
68259c995b56
parent 74
b3f2711684a7
child 119
73655adb5b01
permissions
-rw-r--r--

Makefile: Automatically create build directory if it doesn't exist

include config.unix

ifndef SQUISH
  $(error Please run ./configure first)
endif

SOURCE_FILES=$(shell $(SQUISH) --list-files)
MISSING_FILES=$(shell $(SQUISH) --list-missing-files)

OUTPUT=build/scansion

BIN_DIR=$(PREFIX)/bin

all: $(OUTPUT)

$(OUTPUT): build squishy $(SOURCE_FILES)
	$(SQUISH) --output=$(OUTPUT)

build:
	mkdir build

install: $(OUTPUT)
	install -t $(BIN_DIR) -m 655 $^

clean:
	rm $(OUTPUT)

.PHONY: all clean install

mercurial