Lines Matching refs:make_file

41     FILE   *make_file;  local
86 make_file = fopen (makefile_name, "w");
89 fprintf (make_file, "# Generated automatically by %s\n", argv[0]);
90 fprintf (make_file, "# Make file for %s test\n", testcase_name);
91 fprintf (make_file, "\n");
92 fprintf (make_file, "CFLAGS = +DA1.1 -g\n");
93 fprintf (make_file, "\n");
94 fprintf (make_file, "# This is how to build this generator.\n");
95 fprintf (make_file, "%s.o: %s.c\n", argv[0], argv[0]);
96 fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s.o -c %s.c\n", argv[0], argv[0]);
97 fprintf (make_file, "%s: %s.o\n", argv[0], argv[0]);
98 fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s %s.o\n", argv[0], argv[0]);
99 fprintf (make_file, "\n");
100 fprintf (make_file, "# This is how to run this generator.\n");
101 fprintf (make_file, "# This target should be made before the 'all' target,\n");
102 fprintf (make_file, "# to ensure that the shlib sources are all available.\n");
103 fprintf (make_file, "require_shlibs: %s\n", argv[0]);
106 fprintf (make_file, "\tif ! [ -a lib%2.2d_%s.c ] ; then \\\n", i, testcase_name);
107 fprintf (make_file, "\t %s ; \\\n", argv[0]);
108 fprintf (make_file, "\tfi\n");
110 fprintf (make_file, "\n");
111 fprintf (make_file, "# This is how to build all the shlibs.\n");
112 fprintf (make_file, "# Be sure to first make the require_shlibs target!\n");
115 … fprintf (make_file, "lib%2.2d_%s.o: lib%2.2d_%s.c\n", i, testcase_name, i, testcase_name);
116 …fprintf (make_file, "\t$(CC) $(CFLAGS) +Z -o lib%2.2d_%s.o -c lib%2.2d_%s.c\n", i, testcase_name, …
117 … fprintf (make_file, "lib%2.2d-%s.sl: lib%2.2d-%s.o\n", i, testcase_name, i, testcase_name);
118 …fprintf (make_file, "\t$(LD) $(LDFLAGS) -b -o lib%2.2d-%s.sl lib%2.2d-%s.o\n", i, testcase_name, i…
120 fprintf (make_file, "\n");
121 fprintf (make_file, "# For convenience, here's names for all pieces of all shlibs.\n");
122 fprintf (make_file, "SHLIB_SOURCES = \\\n");
124 fprintf (make_file, "\tlib%2.2d-%s.c \\\n", i, testcase_name);
125 fprintf (make_file, "\tlib%2.2d-%s.c\n", lib_num-1, testcase_name);
126 fprintf (make_file, "SHLIB_OBJECTS = $(SHLIB_SOURCES:.c=.o)\n");
127 fprintf (make_file, "SHLIBS = $(SHLIB_SOURCES:.c=.sl)\n");
128 fprintf (make_file, "SHLIB_NAMES = $(SHLIB_SOURCES:.c=)\n");
129 fprintf (make_file, "EXECUTABLES = $(SHLIBS) %s %s\n", argv[0], testcase_name);
130 fprintf (make_file, "OBJECT_FILES = $(SHLIB_OBJECTS) %s.o %s.o\n", argv[0], testcase_name);
131 fprintf (make_file, "\n");
132 fprintf (make_file, "shlib_objects: $(SHLIB_OBJECTS)\n");
133 fprintf (make_file, "shlibs: $(SHLIBS)\n");
134 fprintf (make_file, "\n");
135 … fprintf (make_file, "# This is how to build the debuggable testcase that uses the shlibs.\n");
136 fprintf (make_file, "%s.o: %s.c\n", testcase_name, testcase_name);
137 fprintf (make_file, "\t$(CC) $(CFLAGS) -o %s.o -c %s.c\n", testcase_name, testcase_name);
138 fprintf (make_file, "%s: shlibs %s.o\n", testcase_name, testcase_name);
139 fprintf (make_file, "\t$(LD) $(LDFLAGS) -o %s -lc -L. ", testcase_name);
140 …fprintf (make_file, "-c %s /opt/langtools/lib/end.o /lib/crt0.o %s.o\n", linkfile_name, testcase_n…
141 fprintf (make_file, "\n");
142 fprintf (make_file, "# Yeah, but you should first make the require_shlibs target!\n");
143 fprintf (make_file, "all: %s %s\n", testcase_name, argv[0]);
144 fprintf (make_file, "\n");
145 fprintf (make_file, "# To remove everything built via this makefile...\n");
146 fprintf (make_file, "clean:\n");
148 fprintf (make_file, "\trm -f lib0*-%s.*\n", testcase_name);
149 fprintf (make_file, "\trm -f lib1*-%s.*\n", testcase_name);
150 fprintf (make_file, "\trm -f lib2*-%s.*\n", testcase_name);
151 fprintf (make_file, "\trm -f lib3*-%s.*\n", testcase_name);
152 fprintf (make_file, "\trm -f lib4*-%s.*\n", testcase_name);
153 fprintf (make_file, "\trm -f lib5*-%s.*\n", testcase_name);
154 fprintf (make_file, "\trm -f lib6*-%s.*\n", testcase_name);
155 fprintf (make_file, "\trm -f lib7*-%s.*\n", testcase_name);
156 fprintf (make_file, "\trm -f lib8*-%s.*\n", testcase_name);
157 fprintf (make_file, "\trm -f lib9*-%s.*\n", testcase_name);
158 …fprintf (make_file, "\trm -f %s %s %s %s.c\n", argv[0], testcase_name, linkfile_name, testcase_nam…
159 fprintf (make_file, "\n");
160 fclose (make_file);