include ../config.mk

CFLAGS += $(STDCFLAG) $(OPTFLAG) -I../sunsort_src -I../sunsort_lib
TARGET  = make_sort
OBJECTS = make_sort.o

all: $(TARGET)
	@echo made $(TARGET)

clean:		
	-rm -f $(TARGET) *.o *~ *%

$(TARGET) : $(OBJECTS)
	$(LINK.c) -o $@ $(OBJECTS)

install: $(TARGET)
	-rm ../$(TARGET)$(VERS) ../makesort
	mv $(TARGET) ../$(TARGET)$(VERS)
	sed -e "s/SORT_VERS=/SORT_VERS=$(VERS)/"  \
		-e "s/EXTRA_DEFS=/EXTRA_DEFS=\"$(XDEFS)\"/" \
		makesort > ../makesort
	chmod 755 ../makesort
	@echo "install $(TARGET)$(VERS) completed ... "


