1 # $NetBSD: Makefile,v 1.5 2012/04/04 10:59:48 joerg Exp $ 2 3 NOMAN= # defined 4 5 .include <bsd.own.mk> 6 7 WARNS= 4 8 9 CPPFLAGS+= -D_FORTIFY_SOURCE=2 10 11 COPTS.h_raw.c= -fstack-protector-all -Wstack-protector 12 COPTS.h_raw.c+= ${${ACTIVE_CC} == "gcc":? --param ssp-buffer-size=1 :} 13 COPTS.h_raw.c+= ${${ACTIVE_CC} == "clang":? -mllvm -stack-protector-buffer-size=1 :} 14 15 16 # Bootstrap hack 17 18 .ifmake !clean && !obj && !cleandir 19 .BEGIN: 20 ${AR} cr libssp_nonshared.a 21 .endif 22 23 CLEANFILES+= libssp_nonshared.a 24 LDFLAGS+= -L. 25 26 TESTSDIR= ${TESTSBASE}/lib/libc/ssp 27 28 TESTS_SH+= t_ssp 29 30 BINDIR= ${TESTSDIR} 31 32 PROGS= h_fgets 33 PROGS+= h_gets 34 PROGS+= h_getcwd 35 PROGS+= h_memcpy 36 PROGS+= h_memmove 37 PROGS+= h_memset 38 PROGS+= h_raw 39 PROGS+= h_read 40 PROGS+= h_readlink 41 PROGS+= h_snprintf 42 PROGS+= h_sprintf 43 PROGS+= h_strcat 44 PROGS+= h_strcpy 45 PROGS+= h_strncat 46 PROGS+= h_strncpy 47 PROGS+= h_vsnprintf 48 PROGS+= h_vsprintf 49 50 .include <bsd.test.mk> 51