#CFLAGS = -Oneatx -l control.lib support.lib
CFLAGS = -Oneatx -N 1024 -l control.lib support.lib

BASE = BasyouhuC9905
INSTDIR=/radops/usr/bin

all:  $(BASE) $(BASE)D $(BASE).debug clean

OBJ = $(BASE).o report2.o

$(BASE) : $(OBJ)
	rm -f *.o
	$(COMPILE.c) -c $(BASE).c
	$(COMPILE.c) -c report2.c
	$(LINK.c) $(OBJ) -o $(BASE)
	usemsg $(BASE) $(BASE).c
	mkdir -p $(INSTDIR)
	mv -V $(BASE) $(INSTDIR)

$(BASE)D : $(OBJ)
	rm -f $(BASE).o
	$(COMPILE.c) -c -DDISCRETIONARY $(BASE).c
	#$(COMPILE.c) -c report2.c
	$(LINK.c) $(OBJ) -o $(BASE)D
	usemsg $(BASE)D $(BASE).c
	mkdir -p $(INSTDIR)
	mv -V $(BASE)D $(INSTDIR)

$(BASE).debug : $(OBJ)
	rm -f $(BASE).o
	$(COMPILE.c) -c -DDEBUG $(BASE).c
	#$(COMPILE.c) -c report2.c
	$(LINK.c) $(OBJ) -o $(BASE).debug
	usemsg $(BASE).debug $(BASE).c
	mkdir -p $(INSTDIR)
	mv -V $(BASE).debug $(INSTDIR)
 
$(BASE)D.debug : $(OBJ)
	rm -f $(BASE).o
	$(COMPILE.c) -c -DDEBUG -DDISCRETIONARY $(BASE).c
	#$(COMPILE.c) -c report2.c
	$(LINK.c) $(OBJ) -o $(BASE)D.debug
	usemsg $(BASE)D.debug $(BASE).c
	mkdir -p $(INSTDIR)
	mv -V $(BASE)D.debug $(INSTDIR)
 
clean :
	rm -f *.o