1#
2# This file and its contents are supplied under the terms of the
3# Common Development and Distribution License ("CDDL"), version 1.0.
4# You may only use this file in accordance with the terms of version
5# 1.0 of the CDDL.
6#
7# A full copy of the text of the CDDL should have accompanied this
8# source.  A copy of the CDDL is also available via the Internet at
9# http://www.illumos.org/license/CDDL.
10#
11
12# Copyright 2012, Richard Lowe.
13
14CC =		gcc
15CFLAGS =	-O1 -m64
16
17LINK.c =  $(CC) $(CFLAGS) -o $@ $^
18COMPILE.s = $(CC) $(CFLAGS) -c -o $@ $^
19
20.KEEP_STATE:
21
22install default: all
23
24%.o: $(TESTDIR)/%.s
25	$(COMPILE.s)
26
27# an R_AMD64_DTPOFF32 with an addend, which must be preserved
28PROGS +=	ld-with-addend
29
30ld-with-addend: ld-with-addend.o
31	$(LINK.c)
32
33all:	$(PROGS)
34
35clobber clean:
36	rm -f $(PROGS) ld-with-addend.o
37
38FRC:
39