# Makefile for dcraw and parse
# Define WITHLCMS to build with LCMS


# Command line flags and libraries:
CCflags = -c -IC:,TCPIPLibs: -Wn
PDEFS=-Driscos
ifdef WITHLCMS
DDEFS=-DRISC_OS -DLOCALTIME
LIBS=TCPIPLibs:o.inetlib C:lcms.o.lcmslib C:o.stubs
else
DDEFS=-DRISC_OS -DNO_LCMS -DLOCALTIME
LIBS=TCPIPLibs:o.inetlib C:o.stubs
endif
Linkflags = -aif -output $@ 


# Final targets:
all: dcraw parse

dcraw: c.dcraw o.riscos
       cc $(CCflags) $(DDEFS) -o o.dcraw c.dcraw
       link $(Linkflags) o.dcraw o.riscos $(LIBS)

parse: c.parse
       cc $(CCflags) $(PDEFS) -o o.parse c.parse
       link $(Linkflags) o.parse TCPIPLibs:o.inetlib C:o.stubs

o.riscos: c.riscos
       cc -c -IC: c.riscos -o o.riscos
