1 # Make file for so-thresh test
7 # This is how to build this generator.
8 gen-so-thresh.o
: ${SRCDIR}/gen-so-thresh.c
9 $(CC
) $(CFLAGS
) -o gen-so-thresh.o
-c
${SRCDIR}/gen-so-thresh.c
10 gen-so-thresh
: gen-so-thresh.o
11 $(CC
) $(CFLAGS
) -o gen-so-thresh gen-so-thresh.o
13 # This is how to run this generator.
14 # This target should be made before the 'all' target,
15 # to ensure that the shlib sources are all available.
16 require_shlibs
: gen-so-thresh
17 if
! [ -a lib00-so-thresh.c
] ; then \
20 if
! [ -a lib01-so-thresh.c
] ; then \
23 if
! [ -a lib02-so-thresh.c
] ; then \
27 # This is how to build all the shlibs.
28 # Be sure to first make the require_shlibs target!
29 lib00-so-thresh.o
: lib00-so-thresh.c
30 $(CC
) $(CFLAGS
) +Z
-o lib00-so-thresh.o
-c lib00-so-thresh.c
31 lib00-so-thresh.sl
: lib00-so-thresh.o
32 $(LD
) $(LDFLAGS
) -b
-o lib00-so-thresh.sl lib00-so-thresh.o
33 lib01-so-thresh.o
: lib01-so-thresh.c
34 $(CC
) $(CFLAGS
) +Z
-o lib01-so-thresh.o
-c lib01-so-thresh.c
35 lib01-so-thresh.sl
: lib01-so-thresh.o
36 $(LD
) $(LDFLAGS
) -b
-o lib01-so-thresh.sl lib01-so-thresh.o
37 lib02-so-thresh.o
: lib02-so-thresh.c
38 $(CC
) $(CFLAGS
) +Z
-o lib02-so-thresh.o
-c lib02-so-thresh.c
39 lib02-so-thresh.sl
: lib02-so-thresh.o
40 $(LD
) $(LDFLAGS
) -b
-o lib02-so-thresh.sl lib02-so-thresh.o
45 # For convenience, here's names for all pieces of all shlibs.
51 SHLIB_OBJECTS
= $(SHLIB_SOURCES
:.c
=.o
)
52 SHLIBS
= $(SHLIB_SOURCES
:.c
=.sl
)
53 SHLIB_NAMES
= $(SHLIB_SOURCES
:.c
=)
54 EXECUTABLES
= $(SHLIBS
) gen-so-thresh so-thresh
55 OBJECT_FILES
= $(SHLIB_OBJECTS
) gen-so-thresh.o so-thresh.o
57 shlib_objects
: $(SHLIB_OBJECTS
)
60 # This is how to build the debuggable testcase that uses the shlibs.
61 so-thresh.o
: so-thresh.c
62 $(CC
) $(CFLAGS
) -o so-thresh.o
-c so-thresh.c
63 so-thresh
: shlibs so-thresh.o
64 $(LD
) $(LDFLAGS
) -o so-thresh
-lc
-L
${OBJDIR} -c so-thresh.linkopts
/opt
/langtools
/lib
/end.o
/lib
/crt0.o so-thresh.o
66 # Yeah, but you should first make the require_shlibs target!
67 all: so-thresh gen-so-thresh
69 # To remove everything built via this makefile...
71 rm -f lib0
*-so-thresh.
*
72 rm -f
*.o gen-so-thresh so-thresh.linkopts so-thresh.c