################################################################### # # # SSSS M M # # S S MM MM # # S M M M M # # SSSS M M M M # # S M M M # # S S M M # # SSSS M M # # # # # ################################################################### # # Default rules for compiling code # CC = bcc DEBUG = -v -N OPTIMIZE = -r- CFLAGS = $(DEBUG) $(OPTIMIZE) # .c.obj : $(CC) -c $(CFLAGS) {$*.c } # # linker flags: # LDFLAGS = $(DEBUG) # MAKE = make -fmakefile.os2 # OTHEROBJS = \ sm_main.obj control.obj do_for.obj editor.obj fft.obj getlist.obj \ help.obj history.obj input.obj lexan.obj keymac.obj \ macros.obj macroed.obj math.obj more.obj mscanf.obj name.obj \ numword.obj pow.obj printv.obj random.obj readcol.obj read_old.obj \ restore.obj spline.obj tokens.obj userfn.obj variable.obj \ vec_arith.obj vec_logical.obj vec_misc.obj vec_strings.obj \ yylex.obj OBJECT = main.obj $(OTHEROBJS) # # Which compiler-compiler to use (you can't use yacc any more, sorry) # YACC = bison\bison -y # # Make all targets (should be first in Makefile) # all : bison.exe sm.exe # # Make SM # sm.exe : main.obj $(OBJECT) libdevices.lib libplotsub.lib libutils.lib $(CC) $(CFLAGS) -esm -sDos2.def @&&! $(OTHEROBJS) main.obj libplotsub.lib libdevices.lib libutils.lib ! # main.obj : main.c ..\AA_Version.h options.h stack.h $(CC) -c $(CFLAGS) main.c # # make control.c from control.y # bison.exe : cd bison @ $(MAKE) bison.exe cd .. control.c control.h : control.y $(YACC) -d control.y - del .b_*.* - del control.c - ren y.tab.c control.c - del control.h - ren y.tab.h control.h control.obj : control.y control.h devices.h options.h stack.h \ vectors.h yaccun.h control.c $(CC) -c $(OVERLAY) $(WINDOWS) $(CFLAGS) -DYYLSP_NEEDED control.c # # make yylex.c from the list of tokens in control.h, # and using lexan() as a source for tokens. # makeyyl.exe : makeyyl.c $(CC) $(CFLAGS) makeyyl.c # yylex.c : control.h makeyyl.exe .\makeyyl control.h lexan yylex # # sm_main can include a block of local code from local.c # sm_main.o : local.c # # Get the libraries from the subdirectories. # libdevices.lib : Devices Devices : cd devices @ $(MAKE) -DCC="$(CC)" -DCFLAGS=" $(CFLAGS)" ..\libdevices.lib cd .. libplotsub.lib : Plotsub Plotsub : cd plotsub @ $(MAKE) -DCC="$(CC)" -DCFLAGS=" $(CFLAGS)" ..\libplotsub.lib cd .. libutils.lib : Utils Utils : cd utils @ $(MAKE) -DCC="$(CC)" -DCFLAGS=" $(CFLAGS)" DEFAULT_PATH="$(DEFAULT_PATH)" \ ..\libutils.lib cd .. # # clean out all object code and junk files # empty : - del sm.exe - cd bison - $(MAKE) empty - cd .. clean : - del *.obj - del *.lib - del *.bak - del makeyyl.exe - del yylex.c - del control.c - del control.h - cd devices - $(MAKE) clean - cd ..\plotsub - $(MAKE) clean - cd ..\utils - $(MAKE) clean - cd ..\bison - $(MAKE) clean - cd .. # # Here are all the dependencies: # #START_DEPEND # dependencies grouped in one line per file do_for.obj : options.h vectors.h yaccun.h editor.obj : charset.h edit.h options.h tty.h fft.obj : options.h sm.h getlist.obj : options.h vectors.h yaccun.h help.obj : options.h history.obj : charset.h edit.h options.h input.obj : charset.h options.h stack.h lexan.obj : lex.h options.h vectors.h yaccun.h keymac.obj : charset.h edit.h options.h macros.obj : charset.h options.h stack.h tree.h macroed.obj : charset.h edit.h options.h more.obj : charset.h options.h mscanf.obj : options.h name.obj : options.h numword.obj : options.h printv.obj : options.h vectors.h readcol.obj : charset.h options.h vectors.h read_old.obj : options.h restore.obj : options.h vectors.h spline.obj : options.h vectors.h tokens.obj : control.h options.h vectors.h yaccun.h userfn.obj : options.h variable.obj : options.h tree.h vec_arith.obj : options.h vectors.h vec_logical.obj : options.h vectors.h yylex.obj : control.h lex.h options.h stack.h vectors.h yaccun.h