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 -m32 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_386_TLS_LDM with a regular R_386_PLT32 not a R_386_TLS_LDM_PLT 28 PROGS += half-ldm 29 30 half-ldm: half-ldm.o 31 $(LINK.c) 32 33 all: $(PROGS) 34 35 clobber clean: 36 rm -f $(PROGS) half-ldm.o 37 38 FRC: