include ../../Makefile.config

CC=gcc

CFLAGS= -O2 -s -Lcosts -shared

COMPILE=$(CC) $(CFLAGS)
LINK=$(CC)

.SUFFIXES: .c
.SUFFIXES: .so

OBJ= at-costs.so \
     be-costs.so \
     ch-costs.so \
     ch.sunrise-costs.so \
     cz-costs.so \
     de-costs.so \
     de.mobilcom.internet-costs.so \
     de.viag.planet-costs.so \
     dk-costs.so \
     de-costs.so \
     es-costs.so \
     fr-costs.so \
     gr-costs.so \
     hr.carnet-costs.so \
     hr.hpt-costs.so \
     hr.hpt.internet-costs.so \
     hu.matav-costs.so \
     it-costs.so \
     jp.ntt-costs.so \
     nl.kpn.belbasis-costs.so \
     nl.kpn.belbudget-costs.so \
     nl.kpn.belplus-costs.so \
     pl-costs.so \
     pt-costs.so \
     sa-costs.so \
     se.tele2-costs.so \
     si-costs.so \
     sk-costs.so \
     uk.bt-costs.so \
     uk.cambridge-costs.so

all: $(OBJ)
 
%.so: %.c
	$(COMPILE) -o $@ $<

clean:
	rm -f *.so *~

install:
	install -d $(INSTDIR)
	install -m 755 *.so $(INSTDIR)
	$(MAKE) $(INSTDIR)/costs.so

$(INSTDIR)/costs.so:
	(cd $(INSTDIR); ln -s $(DEFAULT) costs.so)
