1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
SOURCES=$(wildcard *.pas)
TARGET_CPU=$(shell fpc -iTP)
TARGET_OS=$(shell fpc -iTO)
PREFIX=/usr/local
UNITS_DIR=units/${TARGET_CPU}-${TARGET_OS}
OPTIONS=\
-MObjFPC\
-Scghi\
-Cg\
-O1\
-gw2\
-godwarfsets\
-gl\
-l\
-vewnhibq\
-Fi${UNITS_DIR}\
-Fu${UNITS_DIR}\
-FU${UNITS_DIR}\
-FE.\
all:gir2pas
install: all install-binaries
gir2pas:gir2pascal.lpr $(SOURCES)
mkdir -p ${UNITS_DIR}
fpc $(OPTIONS) $(FPCOPTS) $< -o$@
install-binaries:
install -D -t ${PREFIX}/bin gir2pas
clean:
${RM} -r ${UNITS_DIR} gir2pas
.PHONY: clean
|