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