aboutsummaryrefslogtreecommitdiffstats
path: root/libibex/Makefile
blob: 8cc2c1b873a3959da0d3d3e0f74a3b7451d5cd73 (plain) (blame)
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
OBJS=file.lo index.lo find.lo words.lo
MKINDEXOBJS=mkindex.lo
LOOKUPOBJS=lookup.lo

CFLAGS=${PROF} -g -Wall -Wstrict-prototypes -Wmissing-prototypes `glib-config --cflags` `unicode-config --cflags`
LDFLAGS=${PROF}

LIBTOOL=sh ../libtool

all: libibex.la mkindex lookup

%.lo: %.c
    $(LIBTOOL) --mode compile $(CC) $(CFLAGS) -c -o $@ $<

libibex.la: ${OBJS}
    $(LIBTOOL) --mode link $(CC) -static $^ -o $@

mkindex: ${MKINDEXOBJS} libibex.la
    ${LIBTOOL) --mode link $(CC) ${LDFLAGS} -o mkindex ${MKINDEXOBJS} libibex.la \
        `glib-config --libs` `unicode-config --libs`

lookup: ${LOOKUPOBJS} libibex.la
    $(LIBTOOL) --mode link ${CC} ${LDFLAGS} -o lookup ${LOOKUPOBJS} libibex.la \
        `glib-config --libs` `unicode-config --libs`

clean:
    rm -f ${OBJS} libibex.la
    rm -f ${MKINDEXOBJS} mkindex
    rm -f ${LOOKUPOBJS} lookup
    rm -f *.core *~ INDEX