Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (34 sloc) 1.61 KB
# LiteBSD Ports Makefile.template
V= 1.0 # Must have a value!
PORT= myprogram # Must have a value!
PROG= ${PORT} # Set this for automagic build/install
NOMAN= # Delete this if you have a manual page
SRCS= source1.c source2.c \
source3.c source4.c
CLEANFILES+= # If "make clean" doesn't remove everything
# I like to add these CFLAGS and LDFLAGS as I find
# you often save 15K-30K per program with them.
# Stripping the final binaries also brings down the size a lot.
CFLAGS+= -ffunction-sections -fdata-sections
LDFLAGS+= -Wl,--gc-sections -s
# If you need to link to libraries other than libc and libgcc.
LDADD+= -lm -lncurses
# If you set PROG, then you get automagic building and installation,
# as if it were any other program in the main tree. You can delete
# eveything from here on down, except for the .include <bsd.port.mk>
# line.
# If you do not set PROG, you need to install the port by hand.
# This is easy: the magic target name is do-install.
# You can also use the beforeinstall target with automagic
# installation to install necessary items that are not binaries or
# manual pages, such as READMEs or run-time configuration files.
do-install: # Required, if PROG is not set above
install -d ${DESTDIR}${BINDIR}
install -d ${DESTDIR}${MANDIR}1
install -c -m 555 myprogram ${DESTDIR}${BINDIR}
install -c -m 444 myprogram.0 ${DESTDIR}${MANDIR}1
beforeinstall: # Optional, if PROG is set above
install -d ${DESTDIR}${PREFIX}/share/doc/${PORT}
install -c -m 444 README.md ${DESTDIR}${PREFIX}/share/doc/${PORT}
# You don't need to install the binary our man page here.
.include <bsd.port.mk> # Do not delete this!
You can’t perform that action at this time.