| 1 | SOURCES=$(wildcard *.pas) |
| 2 | TARGET_CPU=$(shell fpc -iTP) |
| 3 | TARGET_OS=$(shell fpc -iTO) |
| 4 | PREFIX=/usr/local |
| 5 | UNITS_DIR=units/${TARGET_CPU}-${TARGET_OS}/gtk3 |
| 6 | OPTIONS=\ |
| 7 | -Fi${UNITS_DIR}\ |
| 8 | -Fu${UNITS_DIR}\ |
| 9 | -FU${UNITS_DIR}\ |
| 10 | -FE.\ |
| 11 | |
| 12 | all:${UNITS_DIR}/gtk3.ppu ${UNITS_DIR}/pangocairo1.ppu |
| 13 | |
| 14 | install: all install-binaries install-sources |
| 15 | |
| 16 | ${UNITS_DIR}/%.ppu:%.pas ${SOURCES} |
| 17 | mkdir -p ${@D} |
| 18 | fpc $(OPTIONS) $< |
| 19 | |
| 20 | install-binaries: |
| 21 | install -D -t ${PREFIX}/${UNITS_DIR} ${UNITS_DIR}/* |
| 22 | |
| 23 | install-sources: |
| 24 | install -D -t ${PREFIX}/share/gtk4pas/gtk3 ${SOURCES} |
| 25 | |
| 26 | clean: |
| 27 | ${RM} -r ${UNITS_DIR} |
| 28 | |
| 29 | .PHONY: clean |