• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src/router/gdb/gdb/testsuite/gdb.hp/gdb.base-hp/
1# Make file for so-thresh test
2
3OBJDIR=.
4SRCDIR=.
5CFLAGS = +DA1.1 -g
6CC=cc
7
8# This is how to build this generator.
9genso-thresh.o: ${SRCDIR}/genso-thresh.c
10	$(CC) $(CFLAGS) -o genso-thresh.o -c ${SRCDIR}/genso-thresh.c
11genso-thresh: genso-thresh.o
12	$(CC) $(CFLAGS) -o genso-thresh genso-thresh.o
13
14# This is how to run this generator.
15# This target should be made before the 'all' target,
16# to ensure that the shlib sources are all available.
17require_shlibs: genso-thresh
18	if ! [ -a lib00-so-thresh.c ] ; then \
19	  genso-thresh ; \
20	fi
21	if ! [ -a lib01-so-thresh.c ] ; then \
22	  genso-thresh ; \
23	fi
24	if ! [ -a lib02-so-thresh.c ] ; then \
25	  genso-thresh ; \
26	fi
27
28# This is how to build all the shlibs.
29# Be sure to first make the require_shlibs target!
30lib00-so-thresh.o: lib00-so-thresh.c
31	$(CC) $(CFLAGS) +Z -o lib00-so-thresh.o -c lib00-so-thresh.c
32lib00-so-thresh.sl: lib00-so-thresh.o
33	$(LD) $(LDFLAGS) -b -o lib00-so-thresh.sl lib00-so-thresh.o
34lib01-so-thresh.o: lib01-so-thresh.c
35	$(CC) $(CFLAGS) +Z -o lib01-so-thresh.o -c lib01-so-thresh.c
36lib01-so-thresh.sl: lib01-so-thresh.o
37	$(LD) $(LDFLAGS) -b -o lib01-so-thresh.sl lib01-so-thresh.o
38lib02-so-thresh.o: lib02-so-thresh.c
39	$(CC) $(CFLAGS) +Z -o lib02-so-thresh.o -c lib02-so-thresh.c
40lib02-so-thresh.sl: lib02-so-thresh.o
41	$(LD) $(LDFLAGS) -b -o lib02-so-thresh.sl lib02-so-thresh.o
42
43
44
45
46# For convenience, here's names for all pieces of all shlibs.
47SHLIB_SOURCES = \
48	lib00-so-thresh.c \
49	lib01-so-thresh.c \
50	lib02-so-thresh.c 
51
52SHLIB_OBJECTS = $(SHLIB_SOURCES:.c=.o)
53SHLIBS = $(SHLIB_SOURCES:.c=.sl)
54SHLIB_NAMES = $(SHLIB_SOURCES:.c=)
55EXECUTABLES = $(SHLIBS) genso-thresh so-thresh
56OBJECT_FILES = $(SHLIB_OBJECTS) genso-thresh.o so-thresh.o
57
58shlib_objects: $(SHLIB_OBJECTS)
59shlibs: $(SHLIBS)
60
61# This is how to build the debuggable testcase that uses the shlibs.
62so-thresh.o: so-thresh.c
63	$(CC) $(CFLAGS) -o so-thresh.o -c so-thresh.c
64so-thresh: shlibs so-thresh.o
65	$(LD) $(LDFLAGS) -o so-thresh -lc -L${OBJDIR} -c so-thresh.lopt /opt/langtools/lib/end.o /lib/crt0.o so-thresh.o
66
67# Yeah, but you should first make the require_shlibs target!
68all: so-thresh genso-thresh
69
70# To remove everything built via this makefile...
71clean:
72	rm -f lib0*-so-thresh.*
73	rm -f *.o genso-thresh so-thresh.lopt so-thresh.c
74	rm -f so-thresh
75