2 # Makefile for AmiCDROM with GNUC
5 #Turn these flags on to enable debugging
9 #And these ones are for normal operation
16 NOEXEC
= /c
/protect flags
=-e
17 STRIP
= strip --remove-section
=.comment
22 # -fbaserel does not work, -msmall-code likewise, -fno-builtin requires ixemul
24 CFLAGS
= $(OPT
) -fno-function-cse
26 LDFLAGS1
= -noixemul
-nostartfiles
30 ifeq "$(OS)" "MorphOS"
32 KILLDEV
= KillDevice RemCDFS
41 $(CC
) $(CFLAGS
) $(DEBUGFLAGS
) -o
$@
$< -c
43 # all object files we have
45 OBJS1
= device.o volumes.o intui.o devsupp.o cdrom.o iso9660.o \
46 rock.o joliet.o hfs.o generic.o path.o charset.o prefs.o
47 OBJS2
= main.o cdrom.o iso9660.o rock.o joliet.o hfs.o generic.o path.o charset.o
49 OBJS4
= checkcd.o cdrom.o iso9660.o rock.o joliet.o hfs.o generic.o path.o charset.o
53 all: cdrom-handler cdrom cdcontrol checkcd
$(KILLDEV
)
55 cdrom-handler
: $(OBJS1
)
56 $(CC
) $(LDFLAGS1
) -o
$@
$(OBJS1
) $(LDLIBS1
) $(DEBUGLIBS
)
61 $(CC
) $(LDFLAGS2
) -o
$@
$(OBJS2
) $(LDLIBS2
) $(DEBUGLIBS
)
65 $(CC
) $(LDFLAGS2
) -o
$@
$(OBJS3
) $(LDLIBS2
) $(DEBUGLIBS
)
69 $(CC
) $(LDFLAGS2
) -o
$@
$(OBJS4
) $(LDLIBS2
) $(DEBUGLIBS
)
72 KillDevice
: KillDevice.c
73 $(CC
) $(CFLAGS
) $(LDFLAGS1
) -o
$@ KillDevice.c
77 $(CC
) $(CFLAGS
) $(LDFLAGS1
) -o
$@
$<
82 iso9660.o
: iso9660.c cdrom.h iso9660.h rock.h generic.h
83 cdrom.o
: cdrom.c cdrom.h
84 rock.o
: rock.c cdrom.h iso9660.h rock.h generic.h
85 joliet.o
: joliet.h iso9660.h
86 device.o
: device.c cdrom.h device.h intui.h devsupp.h generic.h \
87 cdcontrol.h rock.h aros_stuff.h
88 devsupp.o
: devsupp.c devsupp.h cdrom.h intui.h device.h generic.h params.h
89 intui.o
: intui.c intui.h
90 generic.o
: generic.c generic.h cdrom.h iso9660.h rock.h joliet.h params.h
91 main.o
: main.c cdrom.h iso9660.h rock.h generic.h hfs.h
92 hfs.o
: hfs.c hfs.h generic.h cdrom.h params.h
93 cdcontrol.o
: cdcontrol.c cdcontrol.h
94 checkcd.o
: checkcd.c iso9660.h generic.h cdrom.h rock.h
95 volimes.o
: volumes.c volumes.h cdrom.h device.h devsupp.h generic.g debug.h \
96 path.h globals.h aros_stuff.h clib_stuff.h
101 Copy cdrom-handler L
:
102 Copy cdcontrol cdrom checkcd
$(KILLDEV
) C
:
104 # prepare a distribution
107 Copy cdrom-handler
/L
108 Copy cdcontrol cdrom checkcd
$(KILLDEV
) /C
111 # delete all nifty stuff
114 -$(RM
) *.o cdrom cdrom-handler cdcontrol checkcd KillDevice RemCDFS