# Makefile file maintaining the compilation and linking of the
# Siemens P3 binary to P4 ASCII data file format program.
#
# T. P. Vaalsta
# 7 Novemeber 1995
#
# SUBDIRS= include object lib bin doc

### Compiler Options 

# include directory
#
INC= -Iinclude

# Uncomment only if another name(s) required
#CC= cc
#FC= f77

# Optimised code - no debug options
#CFLAGS= -O
#FFLAGS= -O

# Debug compilation
# linux gcc and f2c (f77 script) options
# CFLAGS = -g -ansi  $(INC)
# FFLAGS = -g
# DEC Ultrix f77 options
# FFLAGS = -g -v -std
CFLAGS = -g -std1 -YPOSIX $(INC)
# Silicon Graphics Indy IRIX options
# FFLAGS = -g -v -std
# CFLAGS = -g -ansi -EL $(INC)
# Linking options
# DEC ULTRIX
# FCFLAGS = -YPOSIX

# The compiled program name
#
PROGRAM= siemcvt

# Please do not change anything from this point onwards

LIBS=  -lm

COBJECTS= siemcvt.o

OBJECTS= $(COBJECTS)

all:  all.local

# $(COBJECTS): %.o: %.c
# 	$(CC) $(CFLAGS) -c -o $@ $*.c

# ifeq (.depend, $(wildcard .depend))
# include .depend
# select: all.local
# else
# select: depend
# endif

all.local: $(PROGRAM)

$(PROGRAM): $(OBJECTS)
	$(CC) $(FCFLAGS) -o $@ $(OBJECTS) $(LIBS)

depend dep: FORCE
	@for i in *.c; do $(CPP) -MM $$i; done > .tmpdepend
	@mv .tmpdepend .depend

.PHONY: cleanall clean

cleanall:
	rm -f $(PROGRAM) *.o .depend

clean:
	rm -f $(OBJECTS)

FORCE:
