mirror of
git://git.psyc.eu/libpsyc
synced 2024-08-15 03:19:02 +00:00
make .so
This commit is contained in:
parent
79167f2563
commit
f51aae3485
1 changed files with 12 additions and 3 deletions
15
src/Makefile
15
src/Makefile
|
@ -1,12 +1,15 @@
|
||||||
OPT = -O2
|
OPT = -O2
|
||||||
DEBUG = 2
|
DEBUG = 2
|
||||||
CFLAGS = -I../include -Wall -std=c99 ${OPT}
|
CFLAGS = -I../include -Wall -std=c99 -fPIC ${OPT}
|
||||||
DIET = diet
|
DIET = diet
|
||||||
|
|
||||||
S = packet.c parse.c match.c render.c memmem.c itoa.c variable.c text.c
|
S = packet.c parse.c match.c render.c memmem.c itoa.c variable.c text.c
|
||||||
O = packet.o parse.o match.o render.o memmem.o itoa.o variable.o text.o
|
O = packet.o parse.o match.o render.o memmem.o itoa.o variable.o text.o
|
||||||
P = match itoa
|
P = match itoa
|
||||||
|
|
||||||
|
A = ../lib/libpsyc.a
|
||||||
|
SO = ../lib/libpsyc.so
|
||||||
|
|
||||||
all: CC := ${WRAPPER} ${CC}
|
all: CC := ${WRAPPER} ${CC}
|
||||||
all: lib
|
all: lib
|
||||||
|
|
||||||
|
@ -18,9 +21,15 @@ diet: WRAPPER = ${DIET}
|
||||||
diet: CC := ${WRAPPER} ${CC}
|
diet: CC := ${WRAPPER} ${CC}
|
||||||
diet: lib
|
diet: lib
|
||||||
|
|
||||||
lib: $O
|
lib: $O $A ${SO}
|
||||||
|
|
||||||
|
${SO}:
|
||||||
@mkdir -p ../lib
|
@mkdir -p ../lib
|
||||||
${WRAPPER} ${AR} rcs ../lib/libpsyc.a $O
|
${CC} ${CFLAGS} -shared -lm -o $@ $O
|
||||||
|
|
||||||
|
$A:
|
||||||
|
@mkdir -p ../lib
|
||||||
|
${WRAPPER} ${AR} rcs $@ $O
|
||||||
|
|
||||||
match: match.c
|
match: match.c
|
||||||
${CC} -o $@ -DDEBUG=4 -DCMDTOOL -DTEST $<
|
${CC} -o $@ -DDEBUG=4 -DCMDTOOL -DTEST $<
|
||||||
|
|
Loading…
Reference in a new issue