Skip to content

Instantly share code, notes, and snippets.

@vinnix

vinnix/Makefile Secret

Created October 30, 2013 16:05
Show Gist options
  • Save vinnix/8d71b278e5795282f6dd to your computer and use it in GitHub Desktop.
Save vinnix/8d71b278e5795282f6dd to your computer and use it in GitHub Desktop.
Arquivo usado para compilar a biblioteca. Ou seja, rodar o comando 'make'
MODULES = myLilLibrary
PG_CONFIG = pg_config
PGXS = $(shell $(PG_CONFIG) --pgxs)
INCLUDEDIR = $(shell $(PG_CONFIG) --includedir-server)
include $(PGXS)
myLilLibrary.so: myLilLibrary.o
cc -shared -o myLilLibrary.so myLilLibrary.o
myLilLibrary.o: myLilLibrary.c
cc -o myLilLibrary.o -c myLilLibrary.c $(CFLAGS) -I$(INCLUDEDIR)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment