#
# This is piatan/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=piatan$(XSUFFIX)

$(TARGET) : piatan.c picheck.c picheck.h 
	$(CXX) $(CXXFLAGS) $(LIBS) -o $@ $(filter %.c, $+)
	strip $@

.PHONY: all new runall

all:  $(TARGET)

$(TARGETS) : 

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

runall : $(TARGET)
	$(TARGET)

