[PATCH c-hglib] Makefile: create a shared library for c-hglib

Giovanni Gherdovich g.gherdovich at gmail.com
Sat Sep 21 10:52:04 CDT 2013


2013/9/21 Iulian Stana <julian.stana at gmail.com>:
> # HG changeset patch
> # User Iulian Stana <julian.stana at gmail.com>
> # Date 1379719378 -10800
> #      Sat Sep 21 02:22:58 2013 +0300
> # Node ID a4d8f4e048187eefff3a06f4c7b576f0c20fb262
> # Parent  43bbd8b7a56b5a321bf073246225672ad7402461
> Makefile: create a shared library for c-hglib
>
> diff --git a/hglib/Makefile b/hglib/Makefile
> new file mode 100644
> --- /dev/null
> +++ b/hglib/Makefile
> @@ -0,0 +1,23 @@
> +CC = gcc
> +CFLAGS = -Wall -g -std=c89
> +CHGLIB_OBJ= client.o utils.o
> +SHARED_LIBRARY = chglib
> +
> +
> +build: lib$(SHARED_LIBRARY).so
> +
> +lib$(SHARED_LIBRARY).so: $(CHGLIB_OBJ)
> +       $(CC) -shared $(CHGLIB_OBJ) -o lib$(SHARED_LIBRARY).so -lrt


wait a sec Iulian, why oh why are you linking against librt.so ?
it's for asynch I/O, see `man 7 aio` and `man 3 aio_write`.
You shouldn't need that AFAICT.


> +
> +client.o: client.c
> +       $(CC) $(CFLAGS) -fPIC -c $<
> +
> +utils.o: utils.c
> +       $(CC) $(CFLAGS) -fPIC -c $<
> +
> +
> +.PHONY: clean
> +
> +clean:
> +       rm -f *.o *~ lib$(SHARED_LIBRARY).so
> +
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list