proto.make 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # $Id$
  2. #PARAMS do not remove this line!
  3. SRC_DIR = $(SRC_HOME)/util/ego/sp
  4. EMH=$(TARGET_HOME)/h
  5. EMLIB=$(TARGET_HOME)/lib.bin
  6. LDFLAGS=$(LDOPTIONS)
  7. CPPFLAGS=-DVERBOSE -DNOTCOMPACT -I$(EMH) -I$(SRC_DIR) -I$(EMLIB)/ego
  8. CFLAGS=$(CPPFLAGS) $(COPTIONS)
  9. LINTFLAGS=$(CPPFLAGS) $(LINTOPTIONS)
  10. CFILES=\
  11. $(SRC_DIR)/sp.c
  12. OFILES=\
  13. sp.$(SUF)
  14. HFILES=
  15. PRFILES=\
  16. $(CFILES) $(HFILES) $(SRC_DIR)/proto.make
  17. all: sp
  18. sp: $(OFILES)
  19. $(CC) -o sp $(LDFLAGS) $(OFILES) $(EMLIB)/ego/share.$(LIBSUF) $(EMLIB)/em_data.$(LIBSUF)
  20. install: all
  21. cp sp $(EMLIB)/ego/sp
  22. cmp: all
  23. -cmp sp $(EMLIB)/ego/sp
  24. clean:
  25. rm -f *.$(SUF) sp Out out nohup.out
  26. lint:
  27. $(LINT) $(LINTFLAGS) $(CFILES) $(EMLIB)/ego/$(LINTPREF)share.$(LINTSUF) $(EMLIB)/$(LINTPREF)em_data.$(LINTSUF)
  28. pr:
  29. @pr $(PRFILES)
  30. opr:
  31. make pr | opr
  32. depend:
  33. rm_deps Makefile >Makefile.new
  34. for i in $(CFILES) ; do \
  35. echo "`basename $$i .c`.$$(SUF): $$i" >> Makefile.new ; \
  36. echo ' $$(CC) -c $$(CFLAGS)' $$i >> Makefile.new ; \
  37. $(UTIL_HOME)/lib.bin/cpp -d $(CPPFLAGS) $$i | sed "s/^/`basename $$i .c`.$$(SUF): /" >> Makefile.new ; \
  38. done
  39. mv Makefile Makefile.old
  40. mv Makefile.new Makefile
  41. # do not remove the next line
  42. #DEPENDENCIES
  43. sp.$(SUF): $(SRC_DIR)/sp.c
  44. $(CC) -c $(CFLAGS) $(SRC_DIR)/sp.c
  45. sp.$(SUF): $(SRC_DIR)/../share/stack_chg.h
  46. sp.$(SUF): $(SRC_DIR)/../share/go.h
  47. sp.$(SUF): $(SRC_DIR)/../share/aux.h
  48. sp.$(SUF): $(SRC_DIR)/../share/alloc.h
  49. sp.$(SUF): $(SRC_DIR)/../share/map.h
  50. sp.$(SUF): $(SRC_DIR)/../share/lset.h
  51. sp.$(SUF): $(SRC_DIR)/../share/put.h
  52. sp.$(SUF): $(SRC_DIR)/../share/get.h
  53. sp.$(SUF): $(SRC_DIR)/../share/files.h
  54. sp.$(SUF): $(SRC_DIR)/../share/global.h
  55. sp.$(SUF): $(SRC_DIR)/../share/debug.h
  56. sp.$(SUF): $(SRC_DIR)/../share/types.h
  57. sp.$(SUF): $(EMH)/em_spec.h
  58. sp.$(SUF): $(EMH)/em_mnem.h