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.c = $(CC) $(CFLAGS) -c -o $@ $^
  19 COMPILE.s = $(CC) $(CFLAGS) -c -o $@ $^
  20 
  21 .KEEP_STATE:
  22 
  23 install default: all
  24 
  25 %.o: $(ELF_TESTS)/tests/tls/x86/ld/%.c
  26         $(COMPILE.c)
  27 %.o: $(ELF_TESTS)/tests/tls/x86/ld/%.s
  28         $(COMPILE.s)
  29 
  30 # an R_386_TLS_LDM with a regular R_386_PLT32 not a R_386_TLS_LDM_PLT
  31 PROGS +=        half-ldm
  32 
  33 half-ldm: half-ldm.o
  34         $(LINK.c)
  35 
  36 all:    $(PROGS)
  37 
  38 clobber clean:
  39         rm -f $(PROGS) $(STYLE1OBJS) $(STYLE1R13OBJS) $(STYLE1R12OBJS) \
  40             $(STYLE2OBJS) $(STYLE2R13OBJS) $(STYLE2R12OBJS) $(STYLE2BADNESSOBJS)
  41 
  42 fail: style2-with-badness FRC
  43 
  44 FRC: