1# 2# Makefile for pdisk 3# 4 5MAN_PAGE= \ 6 pdisk.8 7 8MAC_DOC= \ 9 pdisk.html 10 11DOCS= \ 12 HISTORY \ 13 README \ 14 $(MAN_PAGE) \ 15 $(MAC_DOC) 16 17SERVER_README = \ 18 dist.README 19 20SERVER_MESSAGE = \ 21 dist.message 22 23DOCS_INTERNAL= \ 24 HISTORY.ALL \ 25 HOWTO.DISTRIBUTE \ 26 To_do_list \ 27 command-language 28 29SUPPORT= \ 30 make_filename \ 31 make_depend \ 32 make_tags \ 33 checkin_files \ 34 MPWcompare \ 35 name_latest \ 36 next_release 37 38MAC_SOURCE= \ 39 ATA_media.c \ 40 ATA_media.h \ 41 DoSCSICommand.c \ 42 DoSCSICommand.h \ 43 MacSCSICommand.h \ 44 SCSI_media.c \ 45 SCSI_media.h \ 46 pdisk.r 47 48UNIX_SOURCE= \ 49 bitfield.c \ 50 bitfield.h \ 51 convert.c \ 52 convert.h \ 53 cvt_pt.c \ 54 deblock_media.c \ 55 deblock_media.h \ 56 dpme.h \ 57 dump.c \ 58 dump.h \ 59 errors.c \ 60 errors.h \ 61 file_media.c \ 62 file_media.h \ 63 hfs_misc.c \ 64 hfs_misc.h \ 65 io.c \ 66 io.h \ 67 layout_dump.c \ 68 layout_dump.h \ 69 makefile \ 70 media.c \ 71 media.h \ 72 partition_map.c \ 73 partition_map.h \ 74 pathname.c \ 75 pathname.h \ 76 pdisk.c \ 77 pdisk.h \ 78 util.c \ 79 util.h \ 80 validate.c \ 81 validate.h \ 82 version.h 83 84COMMON_OBJECTS = \ 85 partition_map.o \ 86 bitfield.o \ 87 convert.o \ 88 deblock_media.o \ 89 file_media.o \ 90 errors.o \ 91 hfs_misc.o \ 92 io.o \ 93 media.o \ 94 pathname.o \ 95 util.o 96 97UNIX_OBJECTS = \ 98 pdisk.o \ 99 dump.o \ 100 $(COMMON_OBJECTS) \ 101 validate.o 102 103CVT_OBJECTS = \ 104 cvt_pt.o \ 105 $(COMMON_OBJECTS) 106 107 108 109ALL_FILES= $(DOCS) $(DOCS_INTERNAL) $(SUPPORT) $(MAC_SOURCE) $(UNIX_SOURCE) 110 111UNIX_BINARIES= \ 112 pdisk \ 113 cvt_pt 114 115# 116# these names have '__' in place of ' ' to avoid quoting nightmares 117# 118MAC_PROJECT= \ 119 pdisk.mac.bin \ 120 pdisk.mac__Data/CW__Settings.stm.bin \ 121 pdisk.mac__Data/pdisk.tdm.bin \ 122 pdisk.mac__Data/pdisk__68k.tdm.bin 123 124# Constructed under MacOS using CodeWarrior from MAC_PROJECT & sources 125MAC_BINARY= \ 126 pdisk.hqx 127 128MAC_68KBINARY= \ 129 pdisk_68k.hqx 130 131 132CFLAGS = -Wall -D__unix__ 133DIST_TAR_FLAGS = cvf 134 135 136all: $(UNIX_BINARIES) 137 138pdisk: $(UNIX_OBJECTS) 139 cc -o pdisk $(UNIX_OBJECTS) 140 141cvt_pt: $(CVT_OBJECTS) 142 cc -o cvt_pt $(CVT_OBJECTS) 143 144tags: $(MAC_SOURCE) $(UNIX_SOURCE) 145 ctags $(MAC_SOURCE) $(UNIX_SOURCE) 146 147clean: 148 rm -f *.o $(UNIX_BINARIES) list.src 149 150clobber: clean 151 rm -f $(ALL_FILES) $(MAC_BINARY) $(MAC_68KBINARY) tags 152 153# note the sed to reinsert the spaces in the Mac names 154list.src: $(MAC_SOURCE) $(DOCS) $(UNIX_SOURCE) $(MAC_PROJECT) 155 echo $(MAC_SOURCE) $(DOCS) $(UNIX_SOURCE) $(MAC_PROJECT) |\ 156 tr ' ' '\n' | sed -e 's/__/ /g' -e 's,^,pdisk/,' >list.src 157 158# 159# this depends on this source directory being named 'pdisk' 160# 161distribution: list.src 162 cd ..; tar $(DIST_TAR_FLAGS) pdisk/dist/pdisk.src.tar.`date +%Y%m%d` --files-from pdisk/list.src 163 tar $(DIST_TAR_FLAGS) dist/pdisk.bin.tar.`date +%Y%m%d` $(UNIX_BINARIES) $(MAN_PAGE) 164 cp -f $(MAC_DOC) dist/$(MAC_DOC).`date +%Y%m%d` 165 cp -f $(MAC_BINARY) dist/$(MAC_BINARY).`date +%Y%m%d` 166 cp -f $(MAC_68KBINARY) dist/$(MAC_68KBINARY).`date +%Y%m%d` 167 168checkin: 169 ./checkin_files $(ALL_FILES) 170 171checkout: $(ALL_FILES) 172 173diff: 174 rcsdiff $(ALL_FILES) 2>&1 175 176name: 177 ./name_latest $(ALL_FILES) 178 179# 180# in lieu of a real dependency generator 181# 182convert.h: dpme.h 183deblock_media.h: media.h 184dpme.h: bitfield.h 185dump.h: partition_map.h hfs_misc.h 186file_media.h: media.h 187partition_map.h: dpme.h media.h 188pathname.h: media.h 189validate.h: partition_map.h 190 191bitfield.o: bitfield.c bitfield.h 192convert.o: convert.c convert.h 193deblock_media.o: deblock_media.c deblock_media.h 194dump.o: dump.c dump.h pathname.h io.h errors.h 195errors.o: errors.c errors.h 196file_media.o: file_media.c file_media.h errors.h 197io.o: io.c io.h errors.h 198layout_dump.o: layout_dump.c layout_dump.h 199media.o: media.c media.h 200partition_map.o: partition_map.c partition_map.h pathname.h deblock_media.h io.h convert.h util.h errors.h 201pathname.o: pathname.c pathname.h file_media.h 202pdisk.o: pdisk.c pdisk.h io.h partition_map.h pathname.h errors.h dump.h validate.h version.h util.h 203util.o: util.c version.h util.h 204validate.o: validate.c validate.h deblock_media.h pathname.h convert.h io.h errors.h 205 206 207# 208# fake dependencies used only by list.src {for $(MAC_PROJECT)} 209# 210pdisk.mac__Data/CW__Settings.stm.bin: 211pdisk.mac__Data/pdisk.tdm.bin: 212pdisk.mac__Data/pdisk__68k.tdm.bin: 213