IMSL Makefile Example

FFLAGC  =    
opt     = -O2
profile = 
obj     = wo
ildir   =  
LIBS    = -R/usr/local/depot/vni-4.0/vni/CTT4.0/lib/lib.solaris -L/usr/local/depot/vni-4.0/vni/CTT4.0/lib/lib.solaris -Bdynamic -limsl -limslblas -ldl -lnsl -lsocket
FFLAGS	= -ftrap=%none -xtarget=generic
input   = 

CFLAGC  = -O2

FCOMPL  = f90

CCOMPL  = cc 

# list of other directories for source files
.PREFIXES: .

.SUFFIXES:
.SUFFIXES: .f .c .s .o .fil

.f.o:
	$(FCOMPL) -c $(ildir) $(FFLAGC) $(opt) $(profile) $<

.f.fil:
	$(FCOMPL) -il $(FFLAGC) $<

.s.o:
	as $<

.c.o:
	$(CCOMPL) -c $(CFLAGC) $(profile) $<

OBJECTS =wolunf1.o 

INLINE  =

APPLIC: $(INLINE) $(OBJECTS)
	$(FCOMPL) $(FFLAGC) $(FFLAGS) $(profile) -o $(obj) $(OBJECTS) $(LIBS)
	chmod 700 $(obj)

test:
	@echo START TEST ON $(input) , opt = $(opt)
	@echo start test on $(input) , opt = $(opt) >> TIME.LOG
	@date >> TIME.LOG
	@( time $(obj) < $(input) > $(input).out ) 2>> TIME.LOG
	@echo - - - - - - - - - - - >> TIME.LOG

clean:
	@rm -f $(INLINE) $(OBJECTS) $(obj)

consult group