2017-03-09 14:55:16 +00:00
|
|
|
|
|
|
|
MAKE=make
|
|
|
|
|
|
|
|
CFLAGS=-g
|
|
|
|
DEFS=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE
|
2017-03-09 19:32:28 +00:00
|
|
|
#WARN=-Wall -Wunused
|
2017-03-09 14:55:16 +00:00
|
|
|
|
|
|
|
all: lib test
|
|
|
|
|
|
|
|
lib:
|
|
|
|
gcc ${CFLAGS} ${DEFS} -shared -ldl -lpthread -fPIC xconv.c -o libxconv.so
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f core *.o *.so test
|
|
|
|
|
|
|
|
install: all
|
|
|
|
strip libxconv.so
|
|
|
|
cp libxconv.so /mod/lib/libxconv.so
|
2017-03-09 14:57:35 +00:00
|
|
|
cp xconv.h /mod/include
|
2017-03-09 14:55:16 +00:00
|
|
|
|
|
|
|
.c.o:
|
|
|
|
@echo " $<"
|
|
|
|
@$(CC) $(CFLAGS) ${WARN} ${DEFS} ${INCS} -c $< -o $@
|
|
|
|
|
|
|
|
test: test.c
|
|
|
|
$(CC) $(CFLAGS) ${WARN} ${DEFS} ${INCS} $< -o $@ -L. -Wl,-rpath,. -lxconv
|
|
|
|
|