home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / palmos / bart-1.3b2.tar.gz / bart-1.3b2.tar / bart-1.3b2 / Makefile < prev    next >
Makefile  |  2000-03-12  |  3KB  |  107 lines

  1. ## Makefile for BART Scheduler
  2.  
  3. TARGET = bart
  4. APPNAME = "BART Scheduler"
  5. APPID = "BART"
  6. PDB_FILE = $(TARGET)data.pdb
  7. # grab version string from the .rcp file
  8. VERSION = $(shell perl -lne 'print $$1 if /^\s*VERSION\s+\S+\s+"(.+?)"/' $(TARGET).rcp)
  9. DISTFILES = $(TARGET).prc $(PDB_FILE) README LICENSE TODO
  10.  
  11. CVS_MODULE = bart
  12. # change . to _ to get CVS version tag
  13. CVS_VERSION = v$(subst .,_,$(VERSION))
  14.  
  15. OBJS = $(TARGET).o find.o
  16. LIBS =
  17. DEFS =
  18.  
  19. CC = m68k-palmos-coff-gcc
  20.  
  21. CFLAGS = $(DEFS) -Wall -g -O2
  22.  
  23. PILRC = pilrc
  24. OBJRES = m68k-palmos-coff-obj-res
  25. NM = m68k-palmos-coff-nm
  26. BUILDPRC = build-prc
  27. PILOTXFER = pilot-xfer
  28. COPILOTXFER = pilot-xfer -p /dev/copilot
  29.  
  30. all: $(TARGET).prc
  31.  
  32. .S.o:
  33.     $(CC) $(TARGETFLAGS) -c $<
  34.  
  35. .c.s:
  36.     $(CC) $(CSFLAGS) $<
  37.  
  38. $(TARGET).c: $(TARGET).h
  39.  
  40. $(TARGET).h: $(PDB_FILE)
  41.  
  42. $(PDB_FILE): data/bike-names data/bike-restrictions data/fares data/schedules/weekday data/schedules/saturday data/schedules/sunday data/stations data/transfers
  43.     data/make-pdb-file
  44.  
  45. data/schedules/weekday: data/schedules/raw
  46.     data/schedules/extract-sched
  47.  
  48. data/schedules/saturday: data/schedules/raw
  49.     data/schedules/extract-sched
  50.  
  51. data/schedules/sunday: data/schedules/raw
  52.     data/schedules/extract-sched
  53.  
  54. $(TARGET).prc: code0000.$(TARGET).grc code0001.$(TARGET).grc data0000.$(TARGET).grc pref0000.$(TARGET).grc rloc0000.$(TARGET).grc bin.res
  55.     $(BUILDPRC) $(TARGET).prc $(APPNAME) $(APPID) code0001.$(TARGET).grc code0000.$(TARGET).grc data0000.$(TARGET).grc *.bin pref0000.$(TARGET).grc rloc0000.$(TARGET).grc
  56.  
  57. code0000.$(TARGET).grc: $(TARGET)
  58.     $(OBJRES) $(TARGET)
  59.  
  60. code0001.$(TARGET).grc: code0000.$(TARGET).grc
  61.  
  62. data0000.$(TARGET).grc: code0000.$(TARGET).grc
  63.  
  64. pref0000.$(TARGET).grc: code0000.$(TARGET).grc
  65.  
  66. rloc0000.$(TARGET).grc: code0000.$(TARGET).grc
  67.  
  68. bin.res: $(TARGET).rcp
  69.     $(PILRC) $(TARGET).rcp .
  70.     touch bin.res
  71.  
  72. $(TARGET): $(OBJS)
  73.     $(CC) $(CFLAGS) $(OBJS) -o $(TARGET) $(LIBS)
  74.     ! $(NM) -u $(TARGET) | grep .
  75.  
  76. send: $(TARGET).prc $(PDB_FILE)
  77.     $(PILOTXFER) -i $(TARGET).prc
  78. #    $(PILOTXFER) -i $(TARGET).prc $(PDB_FILE)
  79.  
  80. csend: $(TARGET).prc $(PDB_FILE)
  81.     $(COPILOTXFER) -i $(TARGET).prc
  82. #    $(COPILOTXFER) -i $(TARGET).prc $(PDB_FILE)
  83.  
  84. depend:
  85.     makedepend -Y -I. *.c
  86.  
  87. package:
  88.     mkdir pkgtemp
  89.     cd pkgtemp && cvs -Q export -r $(CVS_VERSION) $(CVS_MODULE)
  90.     mv pkgtemp/$(CVS_MODULE) pkgtemp/$(TARGET)-$(VERSION)
  91.     cd pkgtemp/$(TARGET)-$(VERSION) && make && make clean
  92.     cd pkgtemp && tar cf - $(TARGET)-$(VERSION) | gzip -c > ../../$(TARGET)-$(VERSION).tar.gz
  93.     cd pkgtemp && zip -q -r ../../$(TARGET)-$(VERSION).zip $(TARGET)-$(VERSION)
  94.     cd pkgtemp/$(TARGET)-$(VERSION) && zip -q ../../../$(TARGET)-ns-$(VERSION).zip $(DISTFILES)
  95.     rm -rf pkgtemp
  96.  
  97. clean:
  98.     -rm -f *.[oa] $(TARGET) *.bin bin.res *.grc Makefile.bak
  99.  
  100. veryclean: clean
  101.     -rm -rf $(TARGET).prc $(TARGET).pbm $(PDB_FILE) $(TARGET)data.h pilot.ram pilot.scratch data/schedules/{weekday,saturday,sunday}
  102.  
  103. # DO NOT DELETE
  104.  
  105. bart.o: callback.h bartRsc.h bart.h bartdata.h
  106. find.o: callback.h bart.h bartRsc.h
  107.