# (GNU) Makefile for Green Card (Hugs)
# Incomplete, need to compile the
# generated C stubs (ToDo.)

### User serviceable parts  ###
GREENCARD = ../../src/green-card
# Options to compile the sources with.

GREENCARD_OPTS  = --target hugs

##### End of user serviceable parts  #####

all :: StdDIS.hs

%.hs : %.gc
	$(GREENCARD) $(GREENCARD_OPTS) $<

# In order to compile the C stubs, we need to get at
# GreenCard.h. So, configure HUGSSRCDIR to point to
# the directory containing your Hugs' version of 
# it
HUGSSRCDIR = /hugs/src

# If you're working on a Win32 platform, you'll want to
# uncomment the next line, in order for the DLL containing
# the C stubs to be generated.
#
#all :: StdDIS.dll

#
# .so fans should uncomment the next 'all' target.
# 
#all:: StdDIS.so

INCLUDES = -I $(HUGSSRCDIR)

StdDIS.dll :: StdDIS.c
	cl /nologo /LD /MD $(INCLUDES) -DSTRICT -o $@ $<

StdDIS.so :: StdDIS.c
	$(CC) -shared $(INCLUDES) -DSTRICT -o $@ $<


StdDIS.hs : StdDIS.gc
