/* * Jmakefile for Eiffel 3.0 run-time */ CFLAGS = -I$(TOP) -I. -I../ipc/app DPFLAGS = -I$(TOP) -I. -I../ipc/app NETWORK_OBJ = ../ipc/app/network.o /* * Main source files for run-time archive */ LSRC = math.c malloc.c garcol.c local.c store.c retrieve.c \ hash.c traverse.c hashin.c tools.c internal.c plug.c \ copy.c equal.c lmalloc.c out.c timer.c urgent.c sig.c \ hector.c cecil.c bits.c file.c dir.c string.c misc.c \ pattern.c error.c umain.c memory.c argv.c boolstr.c search.c \ run_idr.c path_name.c dle.c object_id.c eif_threads.c ++SOURCES compress.c console.c option.c /* * The following files need a special treatment. */ OTHER = main.c except.c /* * Files addedd only for workbench-type archive */ WADD = debug.c interp.c update.c wbench.c /* * File belonging to workbench archive but built externally (no source). */ NETWORK = network.o /* * Files for workbench have a 'w' pre-pended if they already exist for * the normal run-time archive. */ WSRC = \ compress.c \ console.c \ woption.c \ |expand f!$(LSRC) $(OTHER)! w!f \ -expand \\ /* * Ebench archive does not provide debugging (used to compile the workbench * and avoid eating its own tail..., when using ebench in workbench mode). */ ESRC = \ compress.c \ console.c \ |expand f!$(LSRC)! w!f \ -expand |expand f!$(OTHER)! b!f \ -expand \\ /* * Object files for run-time archive */ LOBJ = \ compress.o \ console.o \ option.o \ |expand f!$(LSRC) $(OTHER)! !f:\.c=.o \ -expand \\ /* * Object files for workbench archive */ WOBJ = \ $(NETWORK) \ |expand f!$(WSRC) $(WADD)! !f:\.c=.o \ -expand \\ /* * Object files for ebench archive */ EOBJ = \ woption.o \ |expand f!$(ESRC) $(WADD)! !f:\.c=.o \ -expand \\ #include "U/workbench.H" ShellScriptLongTarget(eif_size_h,eif_size.h) NormalLibraryTarget(runtime,$(LSRC),$(LOBJ)) SpecialLibraryTarget(wkbench,$(WOBJ),/**/) SpecialLibraryTarget(ebench,$(EOBJ),/**/) SimpleProgramTarget(x2c) AllTarget(eif_config.h eif_portable.h eif_confmagic.h) >RM >LN eif_config.h: $(TOP)/eif_config.h $(RM) $@ $(LN) $(TOP)/eif_config.h . eif_confmagic.h: $(TOP)/eif_confmagic.h $(RM) $@ $(LN) $(TOP)/eif_confmagic.h . eif_portable.h: $(TOP)/eif_portable.h $(RM) $@ $(LN) $(TOP)/eif_portable.h . /* * Workbench files added to SOURCES */ AddSourceFileC(debug) AddSourceFileC(interp) AddSourceFileC(option) AddSourceFileC(update) AddSourceFileC(wbench) AddSourceFileC(main) DependTarget() LintTarget() /* How to build a 'w' file from a normal file. The library for the workbench * is built from w*.c files, which are linked from normal files. Dependencies * for w*.c files will be strong enough to force recompilation of a w*.o if the * original .o was to be rebuilt. */ >LN >RM |expand f!$(LSRC) $(OTHER) option.c! w!f: !f $(RM) w!f $(LN) !f w!f remove:: $(RM) w!f -expand |expand f!option.c $(LSRC) $(OTHER)! w!f:\.c=.o: w!f $(CC) -c $(JCFLAGS) -DWORKBENCH $*.c $(RM) $*.c -expand |expand f!$(WADD)! !f:\.c=.o: !f $(CC) -c $(JCFLAGS) -DWORKBENCH $*.c -expand local_clean:: remove final: libruntime.a work: libwkbench.a /* * The network object is pre-linked with all the needed libraries. */ RemoteTargetDependency(network.o,../ipc/app,network.o) >LIBS network.o: $(RM) network.o $(LN) $(NETWORK_OBJ) $@ /* * Other files to be compiled with -DNOHOOK. */ >LN >RM |expand f!$(OTHER)! b!f: !f $(RM) b!f $(LN) !f b!f remove:: $(RM) b!f -expand |expand f!$(OTHER)! b!f:\.c=.o: b!f $(CC) -c $(JCFLAGS) -DWORKBENCH -DNOHOOK $*.c $(RM) $*.c -expand /* * Run-time tests */ TESTS = mram gram lram eram sram test: $(TESTS) mram >test 2>&1 gram >>test 2>&1 lram >>test 2>&1 eram >>test 2>&1 sram >>test 2>&1 TestProgramTarget(mram,malloc.c,/**/) TestProgramTarget(gram,garcol.c,/**/) TestProgramTarget(lram,local.c,/**/) TestProgramTarget(eram,except.c,/**/) TestProgramTarget(sram,sig.c,/**/) local_realclean:: $(RM) $(TESTS) local_clobber:: $(RM) test