File: Makefile

package info (click to toggle)
pcx 1.1.18-2
  • links: PTS
  • area: non-free
  • in suites: lenny, squeeze
  • size: 2,644 kB
  • ctags: 1,980
  • sloc: ansic: 20,454; fortran: 2,974; makefile: 367; sh: 150; csh: 48
file content (49 lines) | stat: -rw-r--r-- 1,087 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49

ROOTDIR   = ..

SRCDIR    = ${ROOTDIR}/SRC
MEXDIR    = ${ROOTDIR}/mex

TARGETDIR = ${MEXDIR}

NG_LIB    = ../Ng-Peyton/cholesky.a
PCX_LIB   = libPCx.a

# f77 under Solaris does not need the f2c libraries, but g77 does....
# if you have the f2c libraries on your system somewhere then just define
# F2C_LIB appropriately and you're done.
# let me know if you have a more elegant solution!

ifeq ($(FC),g77)
F2C_LIB   = -L../F2C -lf2c
F2C       = f2c
endif

CFLAGS = -O

MEX = mex
MEXDEBUG = -O
MEXOPTS = ${MEXDEBUG} -v -I${SRCDIR} 

mex: ${F2C} ${SRCDIR}/blkLVL.o ${SRCDIR}/Ng-Peyton.o ${TARGETDIR}/${PCX_LIB} 
	$(MEX) $(MEXOPTS) -output PCx PCx_mex.c matPCx_interface.c \
	${SRCDIR}/blkLVL.o ${SRCDIR}/Ng-Peyton.o $(PCX_LIB) \
	$(MISC_OBJS) $(NG_LIB) $(F2C_LIB)

${TARGETDIR}/${PCX_LIB}:
	cd ${SRCDIR}; touch *.c; make TARGETDIR=${TARGETDIR} MEX=MEX objs
	ar r $(PCX_LIB) *.o
	ranlib $(PCX_LIB)

f2c:
	cd ../F2C; make

${SRCDIR}/blkLVL.o:
	cd ${SRCDIR}; make TARGETDIR=./ blkLVL.o

${SRCDIR}/Ng-Peyton.o:
	cd ${SRCDIR}; make TARGETDIR=./ Ng-Peyton.o

clean:
	/bin/rm -f *.mex* *.o *.a