
#
# this is piseek/makefile
#

ifeq ($(suffix $(MAKE)),.exe) # switch for MS DOS options
	CXX=gxx               # MS DOS options
	XSUFFIX=.exe
	RM=-del
	COPY=copy
else                          # LINUX options
	CXX=gcc -static
	XSUFFIX=.elf
	LIBS=-lstdc++
	COPY=cp
endif


TARGET= \
piseek$(XSUFFIX)


$(TARGET) : piseek.c pifile.c myutils.c *.h
	$(CXX) $(CXXFLAGS) $(LIBS) -o $@ $< pifile.c myutils.c
	strip $@


.PHONY: all new
all:  $(TARGET)

new:
	$(RM) $(TARGET)
	$(MAKE) all



