Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[3deeb5]: src / Makefile_unix Maximize Restore History

Download this file

Makefile_unix    46 lines (30 with data), 1.1 kB

# Use GNU Make to process this file

CC=gcc

CFLAGS=-O3 -fpic -std=c99 -Ithirdparty -fvisibility=hidden

include filedefs.mk

toCompile = $(files) $(files_blaslapack)

DFILES = $(addprefix d,$(toCompile)) $(files_notypechange)
SFILES = $(addprefix s,$(toCompile))

files_unix = $(addprefix d,$(toCompile)) $(addprefix s,$(toCompile)) $(files_notypechange)
#files_matlab = $(files) $(files_blaslapack) dltfat_blaslapack_matlab.o sltfat_blaslapack_matlab.o

all: double single

double: $(DFILES) Makefile_unix
	ar rvu libltfat.a $(DFILES) 
	ranlib libltfat.a
	cp -f libltfat.a ../lib

single: $(SFILES) Makefile_unix
	ar rvu libltfatf.a $(SFILES) 
	ranlib libltfatf.a
	cp -f libltfatf.a ../lib

sltfat_blaslapack_matlab.o: ltfat_blaslapack.c config.h
	$(CC) $(CFLAGS) -DLTFAT_SINGLE -DMATLABFORTRAN -c $< -o $*.o

dltfat_blaslapack_matlab.o: ltfat_blaslapack.c config.h
	$(CC) $(CFLAGS) -DLTFAT_DOUBLE -DMATLABFORTRAN -c $< -o $*.o

s%.o: %.c config.h
	$(CC) $(CFLAGS) -DLTFAT_SINGLE  -c $< -o s$*.o

d%.o: %.c config.h
	$(CC) $(CFLAGS) -DLTFAT_DOUBLE  -c $< -o d$*.o

%.o: %.c Makefile config.h
	$(CC) $(CFLAGS) -c $<

clean:
	-rm *.o *.a