File: Example.mk

package info (click to toggle)
skypat 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 664 kB
  • sloc: cpp: 2,545; makefile: 220; ansic: 78; sh: 67
file content (10 lines) | stat: -rw-r--r-- 475 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
# TODO: Using M4 or something for readability.
SHELL := /usr/bin/env bash
define gen_sample_make
.PHONY: SampleMakefile
SampleMakefile:
	echo -e 'INCDIR=../../../../include\nLIBDIR=../../../../lib\nrun: $1\n	LD_LIBRARY_PATH=$$$$(LIBDIR) ./$$$$<\n$$(strip $1): $(filter-out %.h,$2)\n	$$$$(CXX) -I$$$$(INCDIR) -L$$$$(LIBDIR) $$$$^ -fno-rtti -lskypat -o $$$$@\nclean:\n	rm -f $1\n' > $$@

install-data-hook:
	cd $$(DESTDIR)$$($(strip $1)dir) && mv SampleMakefile Makefile
endef