Makefile

From HalfgeekKB
Revision as of 05:16, 14 May 2014 by Psmay (talk | contribs) (Created page with "See also make. ==Boilerplate Makefile== <syntaxhighlight lang=make> BUILD=build MAIN_PRODUCTS = $(BUILD)/product1.dst $(BUILD)/product2.dst default: $(MAIN_PRODUCTS) $...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

See also make.

Boilerplate Makefile

BUILD=build
MAIN_PRODUCTS = $(BUILD)/product1.dst $(BUILD)/product2.dst

default: $(MAIN_PRODUCTS)

$(BUILD):
	mkdir -p build

clean:
	rm -rvf $(BUILD)

$(BUILD)/product1.dst: source1.src | $(BUILD)
	foofilterprogram <$^ >$@

$(BUILD)/product2.dst: source2.src | $(BUILD)
	baroutputprogram -o $@ $^