You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.8 KiB

  1. # $Id$
  2. #
  3. # Cudd - DD package
  4. #---------------------------
  5. .SUFFIXES: .o .c .u
  6. RANLIB = ranlib
  7. CAD = /projects/octtools/octtools/$(MACHINE)
  8. SIS = ..
  9. LINTCREATEFLAG = -C
  10. # files for the package
  11. P = mtr
  12. PSRC = mtrBasic.c mtrGroup.c
  13. PHDR = mtr.h
  14. POBJ = $(PSRC:.c=.o)
  15. # files for the test program
  16. TARGET = test$(P)
  17. SRC = test$(P).c
  18. OBJ = $(SRC:.c=.o)
  19. HDR =
  20. LIBS = ../util/libutil.a
  21. LINTLIBS= ../util/llib-lutil.ln
  22. INCLUDE = -I$(CAD)/include -I$(SIS)/include
  23. CFLAGS = -g $(INCLUDE)
  24. LDFLAGS = -g
  25. LINTFLAGS = $(INCLUDE) ${LINTEXTRAS}
  26. #------------------------------------------------------
  27. $(TARGET): $(PHDR) $(OBJ) $(POBJ) $(LIBS)
  28. $(CC) $(LDFLAGS) -o $(TARGET) $(OBJ) $(POBJ) $(LIBS)
  29. lint: $(PSRC) $(PHDR) $(SRC) $(HDR)
  30. lint $(LINTFLAGS) $(SRC) $(PSRC) $(LINTLIBS)
  31. install: lib$(P).a llib-l$(P).ln
  32. lib$(P).a: $(POBJ)
  33. ar cr $@ $?
  34. $(RANLIB) $@
  35. unpack: lib$(P).a
  36. @for i in $(POBJ); do \
  37. ln -s $(SIS)/$(P)/$$i $(SIS)/unpack; \
  38. done
  39. llib-l$(P).ln: $(PSRC) $(PHDR)
  40. lint $(LINTFLAGS) ${LINTCREATEFLAG}$(P) -n $(PSRC)
  41. clean:
  42. rm -f $(TARGET) *.a *.ln *.o \
  43. [Tt]ags [Mm]ake.out lint malloc.out gmon.out __.SYMDEF
  44. tags: _force
  45. @for i in $(PSRC) $(PHDR); do \
  46. cwd=`pwd`; ctags -a $$cwd/$$i;
  47. done;
  48. strip_depend:
  49. sed '/^#--DO NOT CHANGE ANYTHING AFTER THIS LINE/,$$d' Makefile >mktemp
  50. mv mktemp Makefile
  51. depend:
  52. sed '/^#--DO NOT CHANGE ANYTHING AFTER THIS LINE/,$$d' Makefile >mktemp
  53. echo '#--DO NOT CHANGE ANYTHING AFTER THIS LINE' >>mktemp
  54. $(CAD)/bin/cc-M $(CFLAGS) $(PSRC) | \
  55. sed 's|$(CAD)|$$(CAD)|g' | \
  56. grep -v '/usr/include' >>mktemp
  57. mv mktemp Makefile
  58. #-------------------------- IBM 3090 support -----------------
  59. IBMHOST = opua
  60. IBMDIST = /users2/sis
  61. ibmdist: $(PSRC) $(PHDR)
  62. rdist -Richw $(PSRC) $(PHDR) $(IBMHOST):$(IBMDIST)
  63. #-------------------------------------------------------------
  64. _force: