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 # Copyright 2015 Joyent, Inc. 23 # 24 25 PROG = lxinit 26 27 PROG_OBJS = lxinit.o pipe_stream.o run_command.o 28 LIST_OBJS = list.o 29 30 OBJS = $(PROG_OBJS) \ 31 $(LIST_OBJS) 32 SRCS = $(PROG_OBJS:%.o=%.c) \ 33 $(LIST_OBJS:%.o=$(SRC)/common/list/%.c) 34 35 all: $(PROG) 36 37 include ../Makefile.lx 38 include $(SRC)/cmd/Makefile.cmd 39 40 # override the install directory 41 ROOTBIN = $(ROOTBRANDDIR) 42 CLOBBERFILES = $(OBJS) $(ROOTPROG) 43 44 UTSBASE = $(SRC)/uts 45 46 CFLAGS += $(CCVERBOSE) 47 CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I$(UTSBASE)/common/brand/lx 48 LDLIBS += -lzonecfg -lipadm -lsocket -linetutil -lnsl -lcmdutils -ldhcpagent 49 LINTFLAGS += -xerroff=E_NAME_DEF_NOT_USED2 50 51 .KEEP_STATE: 52 53 install: all $(ROOTPROG) 54 55 clean: 56 $(RM) $(PROG) $(OBJS) 57 58 lint: lint_SRCS 59 60 $(PROG): $(OBJS) 61 $(LINK.c) -o $@ $(OBJS) $(LDLIBS) 62 $(POST_PROCESS) 63 64 %.o: %.c 65 $(COMPILE.c) $< 66 $(POST_PROCESS_O) 67 68 %.o: $(SRC)/common/list/%.c 69 $(COMPILE.c) $< 70 $(POST_PROCESS_O) 71 72 include $(SRC)/cmd/Makefile.targ