1# PUBLIC DOMAIN - NO WARRANTY, see: 2# <http://creativecommons.org/publicdomain/zero/1.0/> 3# 4# Written in 2021 by Alfonso Sabato Siciliano 5 6LIBRARY = bsddialog 7LIBRARY_SO = lib${LIBRARY:=.so} 8LIBRARY_A = lib${LIBRARY:=.a} 9HEADERS = bsddialog.h bsddialog_theme.h bsddialog_progressview.h 10SOURCES = barbox.c datebox.c formbox.c libbsddialog.c lib_util.c \ 11 menubox.c messagebox.c textbox.c theme.c timebox.c 12OBJECTS = ${SOURCES:.c=.o} 13 14.if defined(DEBUG) 15CFLAGS += -g 16.endif 17CFLAGS += -D_XOPEN_SOURCE_EXTENDED -fPIC -Wall -Wextra -std=gnu99 \ 18 -fstack-protector-strong 19LDFLAGS += -fstack-protector-strong -shared -Wl,-x -Wl,--fatal-warnings \ 20 -Wl,--warn-shared-textrel -Wl,-soname,${LIBRARY_SO}.${VERSION} \ 21 -L/usr/lib -lncursesw -ltinfow 22 23LN = ln -s -f 24RM = rm -f 25 26all : ${LIBRARY} 27 28${LIBRARY}: ${LIBRARY_SO} ${LIBRARY_A} 29 30${LIBRARY_SO}.${VERSION}: ${OBJECTS} 31 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${LIBRARY_SO}.${VERSION} 32 33${LIBRARY_SO}: ${LIBRARY_SO}.${VERSION} 34 ${LN} ${LIBRARY_SO}.${VERSION} ${LIBRARY_SO} 35 36${LIBRARY_A}: ${OBJECTS} 37 ${AR} cr ${.TARGET} ${OBJECTS} 38 ${RANLIB} ${.TARGET} 39 40.c.o: 41 ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET} 42 43clean: 44 ${RM} ${LIBRARY_SO}* *.o *~ *.gz ${LIBRARY_A} 45