diff options
| author | EuAndreh <eu@euandre.org> | 2023-11-13 19:24:34 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2023-11-13 19:24:34 -0300 |
| commit | a2d8f45087d26642cd68a9d806bc85219fccf8ce (patch) | |
| tree | 7b49f6c857adba01a19f973cd3e5baad2dc5dd2c /Makefile | |
| parent | tests/assert-*.sh: Reuse rebuilt assets for tests (diff) | |
| download | papod-a2d8f45087d26642cd68a9d806bc85219fccf8ce.tar.gz papod-a2d8f45087d26642cd68a9d806bc85219fccf8ce.tar.xz | |
src/napi-sqlite.c: Add Node-API PoC
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -15,13 +15,15 @@ SRCDIR = $(PREFIX)/src/$(NAME) SHAREDIR = $(PREFIX)/share LOCALEDIR = $(SHAREDIR)/locale MANDIR = $(SHAREDIR)/man +CFLAGS.so = $(CFLAGS) -fPIC +LDFLAGS.so = $(LDFLAGS) -shared ## Where to store the installation. Empty by default. DESTDIR = .SUFFIXES: -.SUFFIXES: .in +.SUFFIXES: .in .c .lo .msg .cat .in: sed \ @@ -33,6 +35,9 @@ DESTDIR = < $< > $@ if [ -x $< ]; then chmod +x $@; fi +.c.lo: + $(CC) $(CFLAGS.so) -o $@ -c $< + manpages.en.in = \ @@ -70,6 +75,8 @@ derived-assets = \ node_modules/dir.sentinel \ node_modules/ \ node_modules/$(NAME) \ + src/napi-sqlite.lo \ + src/napi-sqlite.node \ side-assets = \ ircd.sock \ @@ -82,7 +89,10 @@ side-assets = \ all: $(derived-assets) -$(manpages): Makefile +$(manpages) src/napi-sqlite.lo: Makefile + +src/napi-sqlite.node: src/napi-sqlite.lo + $(CC) $(LDFLAGS.so) -o $@ src/napi-sqlite.lo src/index.js: ln -fs api.js $@ |
