17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
520c1c355SRod Evans# Common Development and Distribution License (the "License").
620c1c355SRod Evans# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
2120c1c355SRod Evans# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
22cf9a187cSAndy Fiddaman# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
23cf9a187cSAndy Fiddaman#
247c478bd9Sstevel@tonic-gate
257c478bd9Sstevel@tonic-gate$(OBJDIR)/%.o:	%.c
267c478bd9Sstevel@tonic-gate		$(COMPILE.c) $< -o $@
277c478bd9Sstevel@tonic-gate		$(POST_PROCESS_O)
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gate$(OBJDIR)/%.o:	../common/%.c
307c478bd9Sstevel@tonic-gate		$(COMPILE.c) $< -o $@
317c478bd9Sstevel@tonic-gate		$(POST_PROCESS_O)
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gate# DEMO DELETE START
3469b1fd3fSRichard Lowe
3569b1fd3fSRichard Lowe$(ROOTONLDBIN):
3669b1fd3fSRichard Lowe		$(INS.dir)
3769b1fd3fSRichard Lowe
3869b1fd3fSRichard Lowe$(ROOTONLDBIN)/$(MACH64):
3969b1fd3fSRichard Lowe		$(INS.dir)
4069b1fd3fSRichard Lowe
4169b1fd3fSRichard Lowe$(ROOTONLDBIN)/%: % $(ROOTONLDBIN)
427c478bd9Sstevel@tonic-gate		$(INS.file)
437c478bd9Sstevel@tonic-gate
4469b1fd3fSRichard Lowe$(ROOTONLDBIN)/$(MACH64)/%: % $(ROOTONLDBIN)/$(MACH64)
457c478bd9Sstevel@tonic-gate		$(INS.file)
467c478bd9Sstevel@tonic-gate# DEMO DELETE END
477c478bd9Sstevel@tonic-gate
487c478bd9Sstevel@tonic-gate$(OBJDIR)/main.o: gram.h
497c478bd9Sstevel@tonic-gate
507c478bd9Sstevel@tonic-gategram.c + gram.h: ../common/gram.y
5120c1c355SRod Evans		$(YACC) -d ../common/gram.y
5220c1c355SRod Evans		$(MV) y.tab.c gram.c
5320c1c355SRod Evans		$(MV) y.tab.h gram.h
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gatelex.c: ../common/lex.l
5620c1c355SRod Evans		$(LEX) ../common/lex.l
5720c1c355SRod Evans		$(MV) lex.yy.c lex.c
587c478bd9Sstevel@tonic-gate
597c478bd9Sstevel@tonic-gate$(PROG):	$(OBJS)
607c478bd9Sstevel@tonic-gate		$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
617c478bd9Sstevel@tonic-gate# DEMO DELETE START
627c478bd9Sstevel@tonic-gate		$(POST_PROCESS)
637c478bd9Sstevel@tonic-gate# DEMO DELETE END
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gatesimp: ../tests/simp.c libsub.so.1
6720c1c355SRod Evans		$(LINK.c) $(LDFLAG) -o $@ ../tests/simp.c -R. ./libsub.so.1
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gatelibsub.so.1: ../tests/sub.c
7067b1ef3cSRichard Lowe		$(LINK.c) $(LDFLAG) -o $@ -G -fpic -hlibsub.so.1 ../tests/sub.c
717c478bd9Sstevel@tonic-gate
727c478bd9Sstevel@tonic-gate#
737c478bd9Sstevel@tonic-gate# RDB sample runs & tests
747c478bd9Sstevel@tonic-gate#
757c478bd9Sstevel@tonic-gatetest-maps: simp FRC
7620c1c355SRod Evans		./rdb -f ../tests/loadmaps ./simp
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gatetest-breaks: simp FRC
7920c1c355SRod Evans		./rdb -f ../tests/breaks ./simp
807c478bd9Sstevel@tonic-gate
817c478bd9Sstevel@tonic-gatetest-steps: simp FRC
8220c1c355SRod Evans		./rdb -f ../tests/steps ./simp
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gatetest-plt_skip: simp FRC
8520c1c355SRod Evans		./rdb -f ../tests/plt_skip ./simp
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gatetest-sparc-regs: simp FRC
8820c1c355SRod Evans		./rdb -f ../tests/test-sparc-regs simp
897c478bd9Sstevel@tonic-gate
907c478bd9Sstevel@tonic-gatetest-object-padding: simp FRC
9120c1c355SRod Evans		./rdb -f ../tests/object_padding_maps simp
927c478bd9Sstevel@tonic-gate
937c478bd9Sstevel@tonic-gate$(OBJDIR):
9420c1c355SRod Evans		-@mkdir -p $(OBJDIR)
957c478bd9Sstevel@tonic-gate
967c478bd9Sstevel@tonic-gateclean: FRC
977c478bd9Sstevel@tonic-gate		$(RM) $(OBJS) $(CLEANFILES)
987c478bd9Sstevel@tonic-gate
997c478bd9Sstevel@tonic-gateclobber: clean FRC
1007c478bd9Sstevel@tonic-gate		$(RM) $(PROG)
1017c478bd9Sstevel@tonic-gate
10269b1fd3fSRichard Lowe# DEMO DELETE START
10369b1fd3fSRichard Lowecatalog check chkmsg:
10469b1fd3fSRichard Lowe# DEMO DELETE END
10569b1fd3fSRichard Lowe
1067c478bd9Sstevel@tonic-gateFRC:
107