1*c76f0793SBaptiste Daroussin# Any copyright is dedicated to the Public Domain, see: 2*c76f0793SBaptiste Daroussin# <http://creativecommons.org/publicdomain/zero/1.0/> 3*c76f0793SBaptiste Daroussin# 4*c76f0793SBaptiste Daroussin# Written by Alfonso Sabato Siciliano 5*c76f0793SBaptiste Daroussin 6*c76f0793SBaptiste DaroussinVERSION = 0.1 7*c76f0793SBaptiste DaroussinLIBRARY = bsddialog 8*c76f0793SBaptiste DaroussinLIBRARY_SO = lib${LIBRARY:=.so} 9*c76f0793SBaptiste DaroussinHEADERS = bsddialog.h bsddialog_theme.h 10*c76f0793SBaptiste DaroussinSOURCES = barbox.c editorbox.c formbox.c lib_util.c menubox.c textbox.c \ 11*c76f0793SBaptiste Daroussin timebox.c commandbox.c filebox.c infobox.c libbsddialog.c messagebox.c \ 12*c76f0793SBaptiste Daroussin theme.c 13*c76f0793SBaptiste DaroussinOBJECTS= ${SOURCES:.c=.o} 14*c76f0793SBaptiste DaroussinFBSDFLAGS= -O2 -pipe -std=gnu99 -Wno-format-zero-length \ 15*c76f0793SBaptiste Daroussin -fstack-protector-strong -Qunused-arguments 16*c76f0793SBaptiste DaroussinCFLAGS = -I/usr/local/include -fPIC -Wall -Wextra ${FBSDFLAGS} 17*c76f0793SBaptiste DaroussinLDFLAGS = -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \ 18*c76f0793SBaptiste Daroussin -Wl,--warn-shared-textrel -Wl,-soname,${LIBRARY_SO}.${VERSION} 19*c76f0793SBaptiste Daroussin 20*c76f0793SBaptiste DaroussinINSTALL_PREFIX=/usr/local 21*c76f0793SBaptiste DaroussinLN = ln -s -f 22*c76f0793SBaptiste DaroussinRM = rm -f 23*c76f0793SBaptiste DaroussinCP = cp 24*c76f0793SBaptiste DaroussinGZIP = gzip -cn 25*c76f0793SBaptiste DaroussinLDCONFIG = /sbin/ldconfig -m 26*c76f0793SBaptiste Daroussin 27*c76f0793SBaptiste Daroussin.if defined(PORTNCURSES) 28*c76f0793SBaptiste Daroussin# PORT ncurses `make -DPORTNCURSES` or `make -D PORTNCURSES` 29*c76f0793SBaptiste DaroussinCFLAGS += -DPORTNCURSES -I/usr/local/include 30*c76f0793SBaptiste DaroussinLDFLAGS += -L/usr/local/lib -lform -lncurses -ltinfo 31*c76f0793SBaptiste Daroussin.else 32*c76f0793SBaptiste Daroussin# BASE ncurses 33*c76f0793SBaptiste DaroussinLDFLAGS += -L/usr/lib -lform -lncurses -ltinfo 34*c76f0793SBaptiste Daroussin.endif 35*c76f0793SBaptiste Daroussin 36*c76f0793SBaptiste DaroussinMAN= ${OUTPUT}.3 37*c76f0793SBaptiste DaroussinGZIP= gzip -cn 38*c76f0793SBaptiste DaroussinMANDIR= /usr/local/share/man/man3 39*c76f0793SBaptiste Daroussin 40*c76f0793SBaptiste DaroussinINSTALL= install 41*c76f0793SBaptiste DaroussinRM= rm -f 42*c76f0793SBaptiste Daroussin 43*c76f0793SBaptiste Daroussin#all : man ${LIBRARY} 44*c76f0793SBaptiste Daroussinall : ${LIBRARY} 45*c76f0793SBaptiste Daroussin 46*c76f0793SBaptiste Daroussin${LIBRARY}: ${OBJECTS} 47*c76f0793SBaptiste Daroussin ${CC} ${LDFLAGS} ${.ALLSRC} -o ${LIBRARY_SO}.${VERSION} 48*c76f0793SBaptiste Daroussin # LN for devel 49*c76f0793SBaptiste Daroussin ${LN} ${LIBRARY_SO}.${VERSION} ${LIBRARY_SO} 50*c76f0793SBaptiste Daroussin 51*c76f0793SBaptiste Daroussin.c.o: 52*c76f0793SBaptiste Daroussin ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} 53*c76f0793SBaptiste Daroussin 54*c76f0793SBaptiste Daroussinman: 55*c76f0793SBaptiste Daroussin ${GZIP} ${LIBRARY}.3 > ${LIBRARY}.3.gz 56*c76f0793SBaptiste Daroussin 57*c76f0793SBaptiste Daroussinclean: 58*c76f0793SBaptiste Daroussin ${RM} ${LIBRARY_SO}* *.o *~ *.gz 59*c76f0793SBaptiste Daroussin 60*c76f0793SBaptiste Daroussin 61*c76f0793SBaptiste Daroussininstall: 62*c76f0793SBaptiste Daroussin ${CP} ${LIBRARY}.h ${INSTALL_PREFIX}/include 63*c76f0793SBaptiste Daroussin ${CP} ${LIBRARY_SO}.${VERSION} ${INSTALL_PREFIX}/lib/ 64*c76f0793SBaptiste Daroussin ${LN} ${INSTALL_PREFIX}/lib/${LIBRARY_SO}.${VERSION} ${INSTALL_PREFIX}/lib/${LIBRARY_SO} 65*c76f0793SBaptiste Daroussin ${LDCONFIG} ${INSTALL_PREFIX}/lib 66*c76f0793SBaptiste Daroussin ${CP} ${LIBRARY}.3.gz ${INSTALL_PREFIX}/man/man3/ 67*c76f0793SBaptiste Daroussin 68*c76f0793SBaptiste Daroussinunistall: 69*c76f0793SBaptiste Daroussin ${RM} ${INSTALL_PREFIX}/include/${LIBRARY}.h 70*c76f0793SBaptiste Daroussin ${RM} ${INSTALL_PREFIX}/lib/${LIBRARY_SO} 71*c76f0793SBaptiste Daroussin ${RM} ${INSTALL_PREFIX}/lib/${LIBRARY_SO}.${VERSION} 72*c76f0793SBaptiste Daroussin ${LDCONFIG} ${INSTALL_PREFIX}/lib 73*c76f0793SBaptiste Daroussin ${RM} ${INSTALL_PREFIX}/man/man3/${LIBRARY}.3.gz 74