+all: $(PORTDIR)/$(LIB)
+
+$(PORTDIR)/$(LIB): $(OBJ) Makefile
+ifeq ($(LIB_TYPE), SDCCLIB)
+ rm -f $@; \
+ ../../../bin/sdcclib -a $@ $(OBJ)
+else ifeq ($(LIB_TYPE), AR)
+ ar -Scq $@ $(OBJ)
+else ifeq ($(LIB_TYPE), RANLIB)
+ ar -Scq $@ $(OBJ)
+ $(top_builddir)/bin/asranlib $@
+else
+ rm -f $@
+ for i in $(basename $(OBJ)); do echo $$i >>$@; done
+ cp $(OBJ) $(PORTDIR)
+endif