# .COPYRIGHT:   Copyright (c) 1988-2011 European Southern Observatory,
#                                               all rights reserved
# .TYPE         make file
# .NAME         $MIDASHOME/$MIDVERS/system/machine/makefile
# .LANGUAGE     makefile syntax
# .ENVIRONMENT  Unix Systems.
# .REMARKS
# .AUTHOR       ESO-IPG, Garching
# .VERSION 1.0  901219
# .VERSION 2.0  920305
# .VERSION 2.2  920521:         Removing SLIB CG
# .VERSION 3.0  930308:		Using default.mk file
# .VERSION 4.0  940328:		Compiles with -DNO_VALUES_H if error.
# .VERSION 4.1  111024:		Delete computer.h before


include ../../local/default.mk

DEV_NULL= >/dev/null 2>&1

M = ../exec

OUT = 	$(M)/computer.exe $(INC)/computer.h

# DEPENDENCIES:
all: $(OUT) 

$(M)/computer.exe: computer.o
	rm -f $(INC)/computer.h
	$(LDCC) computer.o $(MLIB) $(SLIB) -o $@
	$(STRIP) $@

computer.o: computer.c
	$(CC) $(CPPFLAGS) $(CFLAGS) -c computer.c $(DEV_NULL) ||  \
	$(CC) $(CPPFLAGS) $(CFLAGS) -DNO_FLOAT_H  -c computer.c $(DEV_NULL)

$(INC)/computer.h: $(M)/computer.exe
	$(M)/computer.exe $@

clean_exec:
	rm -f $(OUT)
clean:
	rm -f *.o 
