1 SYSTEM
:= $(shell uname
-s
)
5 CP
:= cp
-p
--remove-destination
7 OPTIMIZE
:= -O3
-size
-cpu
=68020 -maxoptpasses
=20
8 CFLAGS
:= $(OPTIMIZE
) -Iinclude
-Iinclude
/amigaos
-Idms
-DCATCOMP_NUMBERS
-DMIN_OS_VERSION
=39
9 DEVICE_FLAGS
:= -Idevice
/include -DDEVICE
10 PLUGIN_FLAGS
:= -D__NOLIBBASE__
11 GUI_FLAGS
:= -Ira_gui
/include -DGUI
-DALL_REACTION_CLASSES
-DALL_REACTION_MACROS
-DFALLBACK_IMAGES
12 ASFLAGS
:= -quiet
-Fhunk
-m68020
13 LINK
:= $(OPTIMIZE
) -final
-Llib
14 LIBS
:= -ldos64
-lamiga
-lvc
15 GUI_LIBS
:= -lamiga
-lauto
17 TARGET
:= diskimage.device
20 SFD
:= sfd
/diskimage_lib.sfd sfd
/z_lib.sfd sfd
/bz2_lib.sfd
21 PROTO
:= $(patsubst sfd
/%_lib.sfd
,include/amigaos
/proto
/%.h
,$(SFD
))
22 CLIB
:= $(patsubst sfd
/%_lib.sfd
,include/amigaos
/clib
/%_protos.h
,$(SFD
))
23 INLINE
:= $(patsubst sfd
/%_lib.sfd
,include/amigaos
/inline
/%_protos.h
,$(SFD
))
24 INCLUDE
:= $(PROTO
) $(CLIB
) $(INLINE
)
26 SUPPORT_OBJS
:= support
/amigaos
/allocvecpooled.o support
/amigaos
/asprintf.o \
27 support
/amigaos
/asprintfpooled.o support
/checkbptr.o support
/checklib.o \
28 support
/copystringbstrtoc.o support
/deletelibrary.o support
/dos64.o \
29 support
/envvar.o support
/getattrs.o support
/getcurrentdir.o support
/hooks.o \
30 support
/lists.o support
/messages.o support
/mutexes.o support
/paths.o support
/ports.o \
31 support
/semaphores.o support
/strlcpy.o support
/m68k
/swab2.o support
/tooltypes.o \
32 support
/istext.o support
/trimstr.o support
/diskimagedevice.o support
/localeinfo.o \
33 support
/translatefuncs.o support
/reallocbuf.o support
/setprocwindow.o
34 PREFS_OBJS
:= prefs
/prefs.o prefs
/readprefs.o prefs
/writeprefs.o
35 DEVICE_OBJS
:= device
/stub_m68k.o device
/init.o device
/io.o device
/unit.o device
/scsicmd.o device
/locale.o \
36 device
/plugins.o device
/tempfile.o device
/progress.o device
/password.o device
/main_vectors.o \
37 device
/plugin_vectors.o plugins
/generic.o plugins
/adf.o plugins
/d64.o plugins
/iso.o
38 PLUGIN_OBJS
:= $(patsubst %.c
,%.o
,$(wildcard plugins
/*.c
) $(wildcard plugins
/cue
/*.c
) \
39 $(wildcard plugins
/dmg
/*.c
) $(wildcard plugins
/fdi
/*.c
))
40 CUE_OBJS
:= plugins
/cue
/cue.o audio
/aiff.o audio
/mp3_mpega.o audio
/wave.o
41 DMS_OBJS
:= dms
/crc_csum.o dms
/getbits.o dms
/tables.o dms
/maketbl.o dms
/u_init.o \
42 dms
/u_deep.o dms
/u_heavy.o dms
/u_medium.o dms
/u_quick.o dms
/u_rle.o
43 GUI_OBJS
:= ra_gui
/locale.o ra_gui
/main.o ra_gui
/cxbroker.o ra_gui
/gui.o ra_gui
/snapshot.o \
44 ra_gui
/images.o ra_gui
/requesters.o ra_gui
/driveops.o ra_gui
/setdevicetype.o \
45 ra_gui
/extwindowclass.o ra_gui
/extscrollerclass.o
46 RAAUTO_OBJS
:= $(patsubst %.c
,%.o
,$(wildcard raauto
/*.c
))
47 ALL_OBJS
:= lib
/support.lib lib
/libsupport.a support
/*.o support
/amigaos
/*.o \
48 support
/m68k
/*.o lib
/prefs.lib lib
/libprefs.a prefs
/*.o device
/*.o plugins
/*.o \
49 plugins
/cue
/*.o plugins
/dmg
/*.o plugins
/fdi
/*.o dms
/*.o audio
/*.o cmd
/*.o ra_gui
/*.o \
50 lib
/raauto.lib raauto
/*.o
51 PLUGINS
:= plugins
/CCD plugins
/CISO plugins
/CPC plugins
/cue
/CUE plugins
/DAA plugins
/DAX \
52 plugins
/dmg
/DMG plugins
/DMS plugins
/fdi
/FDI plugins
/GI plugins
/IPF plugins
/MDS plugins
/NRG \
53 plugins
/UIF plugins
/XAD plugins
/XPK
54 RELEASEDIR
:= ..
/release
/m68k-amigaos
/diskimage_device
56 # -------------------------------------------------------------
58 all: $(INCLUDE
) lib
/support.lib device
/$(TARGET
) $(PLUGINS
) plugins
/Crypt z_library bz2_library \
59 cmd
/MountDiskImage cmd
/MountHDF ra_gui
/DiskImageGUI png_image
61 include/amigaos
/proto
/%.h
: sfd
/%_lib.sfd
62 ifeq ($(SYSTEM
),AmigaOS
)
63 fd2pragma
$< SPECIAL
38 TO
$(dir $@
)
65 fd2pragma
-i
$< -s
38 -t
$(dir $@
)
68 include/amigaos
/clib
/%_protos.h
: sfd
/%_lib.sfd
69 ifeq ($(SYSTEM
),AmigaOS
)
70 fd2pragma
$< SPECIAL
111 TO
$(dir $@
)
72 fd2pragma
-i
$< -s
111 -t
$(dir $@
)
75 include/amigaos
/inline
/%_protos.h
: sfd
/%_lib.sfd
76 ifeq ($(SYSTEM
),AmigaOS
)
77 fd2pragma
$< SPECIAL
70 TO
$(dir $@
)
79 fd2pragma
-i
$< -s
70 -t
$(dir $@
)
82 lib
/support.lib
: $(SUPPORT_OBJS
)
85 lib
/prefs.lib
: $(PREFS_OBJS
)
88 lib
/raauto.lib
: $(RAAUTO_OBJS
)
91 $(DEVICE_OBJS
): CFLAGS
+= $(DEVICE_FLAGS
)
93 device
/$(TARGET
): $(DEVICE_OBJS
) lib
/prefs.lib lib
/support.lib
94 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
$(LIBS
)
96 device
/init.o
: include/rev
/$(TARGET
)_rev.h
97 device
/locale.o
: include/device_locale.h
99 include/device_locale.h
: device
/catalogs
/diskimagedevice.cd
100 ifeq ($(SYSTEM
),AmigaOS
)
101 catcomp
$< NOCODE CFILE
$@
103 catcomp
$< --cfile
$@
106 $(PLUGIN_OBJS
): include/rev
/$(TARGET
)_rev.h
107 $(PLUGIN_OBJS
): CFLAGS
+= $(PLUGIN_FLAGS
)
109 plugins
/CCD
: plugins
/stub_m68k.o plugins
/ccd.o lib
/support.lib
110 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
112 plugins
/CISO
: plugins
/stub_m68k.o plugins
/ciso.o lib
/support.lib
113 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
115 plugins
/CPC
: plugins
/stub_m68k.o plugins
/cpc.o lib
/support.lib
116 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
118 plugins
/cue
/CUE
: plugins
/stub_m68k.o
$(CUE_OBJS
) lib
/support.lib
119 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
121 plugins
/Crypt
: plugins
/stub_m68k.o plugins
/crypt.o lib
/support.lib
122 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
124 plugins
/DAA
: plugins
/stub_m68k.o plugins
/daa.o lib
/support.lib
125 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
127 plugins
/DAX
: plugins
/stub_m68k.o plugins
/dax.o lib
/support.lib
128 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
130 plugins
/dmg
/DMG
: plugins
/stub_m68k.o plugins
/dmg
/dmg.o plugins
/dmg
/base64.o plugins
/dmg
/adc.o lib
/support.lib
131 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
133 plugins
/DMS
: plugins
/stub_m68k.o plugins
/dms.o
$(DMS_OBJS
)
134 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-lvc
136 plugins
/fdi
/FDI
: plugins
/stub_m68k.o plugins
/fdi
/fdi.o plugins
/fdi
/fdi2raw.o
137 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-lmieee
-lvc
139 plugins
/GI
: plugins
/stub_m68k.o plugins
/gi.o lib
/support.lib
140 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
142 plugins
/IPF
: plugins
/stub_m68k.o plugins
/ipf.o
143 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-lvc
145 plugins
/MDS
: plugins
/stub_m68k.o plugins
/mds.o lib
/support.lib
146 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
148 plugins
/NRG
: plugins
/stub_m68k.o plugins
/nrg.o lib
/support.lib
149 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
151 plugins
/UIF
: plugins
/stub_m68k.o plugins
/uif.o lib
/support.lib
152 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
154 plugins
/XAD
: plugins
/stub_m68k.o plugins
/xad.o lib
/support.lib
155 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
157 plugins
/XPK
: plugins
/stub_m68k.o plugins
/xpk.o lib
/support.lib
158 $(CC
) -nostdlib
$(LINK
) -o
$@
$^
-ldos64
-lvc
160 cmd
/MountDiskImage
: cmd
/mountdiskimage.o lib
/support.lib
161 $(CC
) $(LINK
) -o
$@
$^
-lamiga
-lauto
163 cmd
/mountdiskimage.o
: include/rev
/MountDiskImage_rev.h
165 cmd
/MountHDF
: cmd
/mounthdf.o lib
/support.lib
166 $(CC
) $(LINK
) -o
$@
$^
-lamiga
-lauto
168 cmd
/mounthdf.o
: include/rev
/MountHDF_rev.h
170 $(GUI_OBJS
): CFLAGS
+= $(GUI_FLAGS
)
172 ra_gui
/DiskImageGUI
: $(GUI_OBJS
) lib
/prefs.lib lib
/support.lib lib
/raauto.lib
173 $(CC
) $(LINK
) -o
$@
$^
$(GUI_LIBS
)
175 ra_gui
/main.o ra_gui
/requesters.o
: include/rev
/DiskImageGUI_rev.h
176 ra_gui
/locale.o
: ra_gui
/include/locale.h
178 ra_gui
/include/locale.h
: ra_gui
/catalogs
/diskimagegui.cd
179 ifeq ($(SYSTEM
),AmigaOS
)
180 catcomp
$< NOCODE CFILE
$@
182 catcomp
$< --cfile
$@
185 .PHONY
: z_library bz2_library expat_library png_image
187 z_library bz2_library expat_library png_image
:
190 .PHONY
: dist clean revision
193 $(CP
) device
/$(TARGET
) $(RELEASEDIR
)/Devs
/
194 $(CP
) $(PLUGINS
) $(RELEASEDIR
)/Devs
/DiskImage
/
195 $(CP
) z_library
/z.library
$(RELEASEDIR
)/Libs
/
196 $(CP
) bz2_library
/bz2.library
$(RELEASEDIR
)/Libs
/
197 $(CP
) cmd
/MountDiskImage cmd
/MountHDF
$(RELEASEDIR
)/C
/
198 $(CP
) ra_gui
/DiskImageGUI
$(RELEASEDIR
)/
199 $(CP
) png_image
/png.image
$(RELEASEDIR
)/Classes
/Images
/
200 $(CP
) device
/catalogs
/*.cd
$(RELEASEDIR
)/Catalogs
/
201 $(CP
) ra_gui
/catalogs
/*.cd
$(RELEASEDIR
)/Catalogs
/
205 $(MAKE
) -C png_image
clean
206 $(MAKE
) -C z_library
clean
207 $(MAKE
) -C bz2_library
clean
210 bumprev
-n
$(TARGET
) $(VERSION
) include/rev
/$(TARGET
)
211 bumprev
-n MountDiskImage
$(VERSION
) include/rev
/MountDiskImage
212 bumprev
-n MountHDF
$(VERSION
) include/rev
/MountHDF
213 bumprev
-n DiskImageGUI
$(VERSION
) include/rev
/DiskImageGUI