1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 22 # 23 # Copyright 2010 Sun Microsystems, Inc. All rights reserved. 24 # Copyright 2017 Jason King. 25 # Copyright (c) 2017, Joyent, Inc. 26 # 27 28 PROG = in.ikev2d 29 30 OBJS = buf.o \ 31 config.o \ 32 config_parse.o \ 33 dh.o \ 34 fromto.o \ 35 ikev2_common.o \ 36 ikev2_enum.o \ 37 ikev2_pkt.o \ 38 ikev2_proto.o \ 39 ikev2_sa.o \ 40 ikev2_sa_init.o \ 41 inbound.o \ 42 main.o \ 43 pfkey.o \ 44 preshared.o \ 45 prf.o \ 46 pkcs11.o \ 47 pkt.o \ 48 random.o \ 49 timer.o \ 50 worker.o 51 52 SRCS = $(OBJS:%.o=../common/%.c) 53 54 include ../../../../Makefile.cmd 55 include ../../Makefile.lib 56 57 CPPFLAGS += -D__EXTENSIONS__ 58 CPPFLAGS += -DHAVE_POSIX_STYLE_SOCKET_PROTOTYPES -D_POSIX_PTHREAD_SEMANTICS 59 60 # Use X/Open sockets for fromto.c 61 fromto.o := CPPFLAGS += -D_XOPEN_SOURCE=600 62 63 # ... but as a consequence, you have to disable a few lint checks. 64 LINTFLAGS += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_VAL_TYPE_DECL2 65 LINTFLAGS64 += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_VAL_TYPE_DECL2 66 67 C99MODE = $(C99_ENABLE) 68 CFLAGS += $(CCVERBOSE) -D_REENTRANT 69 CFLAGS64 += $(CCVERBOSE) -D_REENTRANT 70 LDLIBS += -lnsl -lsecdb -lumem -lxnet -lipsecutil -lpkcs11 -lcryptoutil 71 LDLIBS += -lnvpair -luutil -lbunyan 72 73 FILEMODE = 0555 74 GROUP = bin 75 76 CLEANFILES += $(OBJS) 77 78 .KEEP_STATE: 79 80 .PARALLEL: 81 82 all: $(PROG) 83 84 $(PROG): $(OBJS) 85 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 86 $(POST_PROCESS) ; $(STRIP_STABS) 87 88 clean: 89 -$(RM) $(CLEANFILES) 90 91 lint: lint_SRCS 92 93 %.o: ../common/%.c 94 $(COMPILE.c) $< 95 96 include ../../../../Makefile.targ