#
# sample Makefile
#
LD = ${ld}
LD_SHARED = ${ld_shared}
PERL = ${perl}
RM_F = ${rm_f}
SO = ${so}


# add your dynamic pmcs here

all: foo$(SO) subproxy$(SO)

.SUFFIXES: .pmc .c $(SO)

# preserve .c if needed
.PRECIOUS: %.c

%.c  : %.pmc
	$(PERL) ..${slash}classes${slash}pmc2c.pl $<

%$(SO) : %.c
	$(LD) $(LD_SHARED) $(LD_SHARED_FLAGS) $(LDFLAGS) -o $@ \
		-I..${slash}include -I..${slash}classes \
		-L..${slash}blib${slash}lib -lparrot $<
	$(PERL) -MFile::Copy=cp -e ${PQ}cp q|$@|, q|../runtime/parrot/dynext/$@|${PQ}

clean :
	$(RM_F) *.c *.h *$(SO) *.dump

realclean: clean
	$(RM_F) Makefile

distclean: realclean

cvsclean: realclean
