Home | History | Annotate | Line # | Download | only in ssp
      1 # $NetBSD: Makefile,v 1.12 2023/11/10 23:03:25 christos 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":? --param ssp-buffer-size=1 :}
     14 
     15 # Bootstrap hack
     16 
     17 .ifmake !clean && !obj && !cleandir
     18 .BEGIN:
     19 	${AR} cr libssp_nonshared.a
     20 .endif
     21 
     22 CLEANFILES+= 	libssp_nonshared.a
     23 LDFLAGS+=	-L.
     24 
     25 TESTSDIR=	${TESTSBASE}/lib/libc/ssp
     26 
     27 TESTS_SH+=	t_ssp
     28 
     29 BINDIR=		${TESTSDIR}
     30 
     31 PROGS=		h_fgets
     32 PROGS+=		h_gets
     33 PROGS+=		h_getcwd
     34 PROGS+=		h_getcwd2
     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_stpcpy
     44 PROGS+=		h_stpncpy
     45 PROGS+=		h_strcat
     46 PROGS+=		h_strcpy
     47 PROGS+=		h_strncat
     48 PROGS+=		h_strncpy
     49 PROGS+=		h_vsnprintf
     50 PROGS+=		h_vsprintf
     51 
     52 # Test exercises truncation
     53 COPTS.h_snprintf.c+=	${CC_WNO_FORMAT_TRUNCATION}
     54 
     55 .include <bsd.test.mk>
     56