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 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 26 all: $(PROG) 27 28 ctfconvert: $(CVTOBJS) 29 $(LINK.c) -o $@ $(CVTOBJS) $(LDLIBS) 30 $(POST_PROCESS) 31 32 ctfmerge: $(MRGOBJS) 33 $(LINK.c) -o $@ $(MRGOBJS) $(LDLIBS) 34 $(POST_PROCESS) 35 36 %.o: ../%.c 37 $(COMPILE.c) $< 38 39 %.ln: ../%.c 40 $(LINT.c) -c $< 41 42 $(ROOTONBLDMACHPROG): $(SELFTEST) 43 $(SELFTEST): $(PROG) 44 45 install: $(PROG) $(SELFTEST) .WAIT $(ROOTONBLDMACHPROG) 46 47 lint: $(LINTFILES) 48 $(LINT) $(LINTFLAGS) $(CVTLINTFILES) 49 $(LINT) $(LINTFLAGS) $(MRGLINTFILES) 50 51 clean: 52 $(RM) $(OBJS) 53 54 CLOBBERFILES=$(LINTFILES) 55 56 # 57 # After we've built ctfconvert and ctfmerge, let's use them on ourselves. The 58 # RPATH in the built ctfconvert will only know how to find libdwarf if we invoke 59 # the one in $(ROOT). We haven't installed it there yet, though, so we have to 60 # invoke the one in $(SRC). We'll manually tell it where libdwarf is. 61 # 62 selftest: ctf_o ctfconvert_merge ctfmerge_merge 63 64 ctf_o: $(OBJS:%.o=%_ctf) 65 66 %_ctf: %.o ctfconvert 67 LD_LIBRARY_PATH=$(DWARFSRCLIBDIR)/$(MACH) ./ctfconvert -l $@ $< 68 69 ctfconvert_merge: ctf_o ctfmerge 70 ./ctfmerge -l $@ -o ctfconvert $(CVTOBJS) 71 72 ctfmerge_merge: ctf_o ctfmerge 73 ./ctfmerge -l $@ -o ctfmerge $(MRGOBJS) 74 75 include ../../Makefile.ctf.targ