#
# this is bbp/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=g++ -static
	XSUFFIX=.elf
	LIBS=-lstdc++
	COPY=cp
endif


CXXFLAGS=-Wall -O

TARGETS= \
bbp$(XSUFFIX) \
bell16$(XSUFFIX) \
bell10$(XSUFFIX) \
pschill$(XSUFFIX) \

%$(XSUFFIX) : %.c
	$(CXX) $(CXXFLAGS) $(LIBS) -o $@ $<
	strip $@


.PHONY: all new runall

all:  $(TARGETS)

$(TARGETS) : 

new:
	$(RM) *$(XSUFFIX)
	$(MAKE) all

runall : $(TARGETS)
	bbp$(XSUFFIX)    10001
	bell16$(XSUFFIX) 10001
	pschill$(XSUFFIX) 10001
	bell10$(XSUFFIX)  2001


