CC = gcc -O2 -mno-cygwin AS = nasmw -O2 -f coff LINKEXE = gcc LINKDLL = gcc --shared LINKOPTS = -Wl,--enable-stdcall-fixup,-lcomctl32,-lcomdlg32,-lgdi32 RC = windres RM = del RMRECURSIVE = del /s OUTDIR = .\testbed all: \ $(OUTDIR)/dvdsynth2k.exe \ $(OUTDIR)/dvdsynth95.exe \ $(OUTDIR)/MirrorDrive2k.dll \ $(OUTDIR)/MirrorDrive95.dll \ $(OUTDIR)/Filters.dll \ $(OUTDIR)/LogScsi.dll \ $(OUTDIR)/LogScsi.kll \ $(OUTDIR)/DVDSubber.dll \ $(OUTDIR)/DVDSubber.kll \ $(OUTDIR)/DVDUnrestrict.dll \ $(OUTDIR)/DVDUnrestrict.kll $(OUTDIR)/dvdsynth2k.exe: \ dvdsynth2k/dvdsynth.o \ dvdsynth2k/asm.o \ dvdsynth2k/ConfigMgr.o \ dvdsynth2k/kernel.o \ dvdsynth2k/miniport.o \ dvdsynth2k/SharedPool.o \ dvdsynth2k/udfrecognize.o \ dvdsynth2k/VDevice.o \ dvdsynth2k/dvdsynth.coff \ dvdsynth2k/libcfgmgr32.a $(LINKEXE) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/dvdsynth95.exe: \ dvdsynth95/dvdsynth.o \ dvdsynth95/ConfigMgr.o \ dvdsynth95/miniport.o \ dvdsynth95/SharedPool.o \ dvdsynth95/udfrecognize.o \ dvdsynth95/VDevice.o \ dvdsynth95/dvdsynth.coff \ dvdsynth95/libcfgmgr32.a $(LINKEXE) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/MirrorDrive2k.dll: MirrorDrive2k/MirrorDrive2k.o MirrorDrive2k/MirrorDrive2k.coff MirrorDrive2k/MirrorDrive2k.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/MirrorDrive95.dll: MirrorDrive95/MirrorDrive95.o MirrorDrive95/MirrorDrive95.coff MirrorDrive95/MirrorDrive95.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/Filters.dll: Filters/Filters.o Filters/Filters.coff Filters/Filters.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/LogScsi.dll: LogScsi/LogScsi.o LogScsi/ui.o LogScsi/LogScsi.coff LogScsi/LogScsi.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/LogScsi.kll: LogScsi/LogScsi_kernel.o LogScsi/LogScsi_kernel.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/DVDSubber.dll: \ DVDSubber/DVDSubber.o \ DVDSubber/DVDSubber-compile.o \ DVDSubber/DVDSubber-dialog.o \ DVDSubber/DVDSubber-encode.o \ DVDSubber/DVDSubber-format.o \ DVDSubber/DVDSubber-render.o \ DVDSubber/DVDSubber-vobscan.o \ DVDSubber/DVDSubber.coff \ DVDSubber/DVDSubber.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/DVDSubber.kll: DVDSubber/DVDSubber_kernel.o DVDSubber/DVDSubber_kernel.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/DVDUnrestrict.dll: DVDUnrestrict/DVDUnrestrict.o DVDUnrestrict/DVDUnrestrict.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ $(OUTDIR)/DVDUnrestrict.kll: DVDUnrestrict/DVDUnrestrict_kernel.o DVDUnrestrict/DVDUnrestrict_kernel.def $(LINKDLL) -o $@ $^ $(LINKOPTS) strip $@ %.o : %.c $(CC) -c $< -o $@ %.o : %.cpp $(CC) -c $< -o $@ %.o : %.asm $(AS) -o $@ $< %.coff : %.rc $(RC) -i $< -o $@ --include-dir $(