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 14 CC = gcc 15 CFLAGS = -O1 -m64 16 17 LINK.c = $(CC) $(CFLAGS) -o $@ $^ 18 COMPILE.s = $(CC) $(CFLAGS) -c -o $@ $^ 19 20 .KEEP_STATE: 21 22 install default: all 23 24 %.o: $(TESTDIR)/%.s 25 $(COMPILE.s) 26 27 # an R_AMD64_DTPOFF32 with an addend, which must be preserved 28 PROGS += ld-with-addend 29 30 ld-with-addend: ld-with-addend.o 31 $(LINK.c) 32 33 all: $(PROGS) 34 35 clobber clean: 36 rm -f $(PROGS) ld-with-addend.o 37 38 FRC: