summaryrefslogtreecommitdiff
path: root/ipl/cfuncs/Makefile
blob: 802e85b776e2d61bafc2e3807703c8796bbdc5f0 (plain)
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
#  Makefile for the dynamically loaded C function library.
#
#  If building with the compiler (instead of the interpreter)
#  use the "-fs" option to avoid problems.


include ../../Makedefs

ICONT = icont
IFLAGS = -us

FUNCLIB = libcfunc.so

.SUFFIXES: .c .o
.c.o:			; $(CC) $(CFLAGS) $(CFDYN) -c $<

FUNCS = bitcount.o external.o files.o fpoll.o internal.o lgconv.o osf.o \
	pack.o ppm.o process.o tconnect.o
CSRC = $(FUNCS:.o=.c)


default:	cfunc.u2 $(FUNCLIB)


# library

$(FUNCLIB):	$(FUNCS) mklib.sh
		CC="$(CC)" CFLAGS="$(CFLAGS)" BIN="../../bin" \
		    sh mklib.sh $(FUNCLIB) $(FUNCS)
$(FUNCS):	icall.h


# Icon interface

cfunc.u2:	cfunc.icn
		$(ICONT) $(IFLAGS) -c cfunc.icn
cfunc.icn:	$(CSRC) mkfunc.sh
		sh mkfunc.sh $(FUNCLIB) $(FUNCS) >cfunc.icn


# cleanup

clean Clean:
		rm -f $(FUNCLIB) *.o *.u? *.so so_locations cfunc.icn