Skip to content

Quickstart Makefile

Franco Corbelli edited this page Sep 3, 2023 · 1 revision

WARNING: the Makefile is almost "universal",

BUT

beware of path: sometimes you need to pre-fix /usr/local/bin to /usr/bin in the line BINDIR=

wget http://www.francocorbelli.it/Makefile -O Makefile

Why cc for a C++ file? LSS ancient-backward-compatibility

CC?=            cc
INSTALL?=       install
RM?=            rm
PROG=           zpaqfranz
CFLAGS+=        -O3 -Dunix
LDADD=          -pthread -lstdc++ -lm
BINDIR=         /usr/local/bin
BSD_INSTALL_PROGRAM?=   install -m 0555

all:    build

build:  ${PROG}

install:        ${PROG}
	${BSD_INSTALL_PROGRAM} ${PROG} ${DESTDIR}${BINDIR}

${PROG}:        ${OBJECTS}
	${CC}  ${CFLAGS} zpaqfranz.cpp -o ${PROG} ${LDADD}
clean:
	${RM} -f ${PROG}
Clone this wiki locally