home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / M2V11-2.LHA / modula / dice / dice.lha / examples / shared_lib / DMakefile < prev    next >
Encoding:
Makefile  |  1991-04-15  |  1.5 KB  |  63 lines

  1.  
  2. #   dtaacs.library
  3.  
  4. OD = dtmp:sharlib/
  5. EXE = libs:test.library
  6. CFLAGS= -mRR -ms -s -I$(OD) -l0 -lcr -lamigasr20 -proto
  7. PROTOS= $(OD)lib-protos.h
  8. LIB= dtmp:sharlib/test.lib
  9. RLIB= dtmp:sharlib/testr.lib
  10. TEST1= t:test1
  11. TEST2= t:test2
  12.  
  13. SRCS= tag.a lib.c init.c funcs.c
  14. OBJS= $(SRCS:"*.a":"$(OD)*.o") $(SRCS:"*.c":"$(OD)*.o")
  15.  
  16. all: $(PROTOS) $(EXE) $(LIB) $(RLIB) $(TEST1) $(TEST2)
  17.  
  18. #   note:   flush program flushes memory (i.e. any previous version of
  19. #   this library that is in memory is flushed), new utility that does
  20. #   not exist on older DICE distributions.
  21.  
  22. $(EXE) : $(OBJS)
  23.     dcc $(CFLAGS) %(right) -o %(left) -v
  24.     -flush
  25.  
  26. $(OBJS) : $(SRCS)
  27.     dcc $(CFLAGS) %(right) -o %(left) -c
  28.  
  29. $(OD)auto.o : auto.a
  30.     dcc $(CFLAGS) %(right) -o %(left) -c -S
  31.  
  32. $(PROTOS) : $(SRCS)
  33.     makeproto -o %(left) %(right)
  34.  
  35. $(LIB) : $(OD)auto.o lib.fd
  36.     fdtolib lib.fd -o t:lib.o -I$(OD)
  37.     join t:lib.o $(OD)auto.o AS %(left)
  38.     delete t:lib.o
  39.  
  40. $(RLIB) : $(OD)auto.o lib.fd
  41.     fdtolib lib.fd -mr -h defs.h -o t:lib.o -I$(OD)
  42.     join t:lib.o $(OD)auto.o AS %(left)
  43.     delete t:lib.o
  44.  
  45. #   TEST1   - compiled with registered args
  46. #   TEST2   - compiled without registered args
  47. #
  48. #   note: cannot use $(CFLAGS) here since it is setup for the library
  49. #      compilation.
  50.  
  51. $(TEST1) : test.c
  52.     dcc test.c -o %(left) -l$(OD)testr -mRR -DREGISTERED
  53.     -delete t:test.o
  54.  
  55. $(TEST2) : test.c
  56.     dcc test.c -o %(left) -l$(OD)test
  57.     -delete t:test.o
  58.  
  59. clean:
  60.     -delete $(OBJS) $(PROTOS) $(OD)auto.o t:test1 t:test2 QUIET
  61.     touch lib.fd
  62.  
  63.