Skip to content

Commit e3c5c80

Browse files
committed
Update Makefile for easier linux build
1 parent 53e6388 commit e3c5c80

File tree

1 file changed

+7
-19
lines changed

1 file changed

+7
-19
lines changed

Makefile

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: lintcheck format cleandepend cleansql docs clean test all
1+
.PHONY: lintcheck format cleansql docs clean test all
22

33
PLJS_VERSION = 0.8.1
44

@@ -10,7 +10,7 @@ INCLUDEDIR_SERVER := ${shell $(PG_CONFIG) --includedir-server}
1010

1111
CP = cp
1212
SRCS = src/pljs.c src/cache.c src/functions.c src/types.c src/params.c
13-
OBJS = src/pljs.o src/cache.o src/functions.o src/types.o src/params.o deps/quickjs/libquickjs.a
13+
OBJS = src/pljs.o src/cache.o src/functions.o src/types.o src/params.o
1414
MODULE_big = pljs
1515
EXTENSION = pljs
1616
DATA = pljs.control pljs--$(PLJS_VERSION).sql
@@ -21,19 +21,18 @@ REGRESS = init-extension function json jsonb json_conv types bytea context \
2121
cursor array_spread plv8_regressions memory_limits inline composites \
2222
trigger procedure find_function
2323

24-
all: deps/quickjs/libquickjs.a pljs--$(PLJS_VERSION).sql
25-
24+
all: deps/quickjs/quickjs.h deps/quickjs/libquickjs.a pljs--$(PLJS_VERSION).sql
2625

2726
include $(PGXS)
2827

29-
28+
src/pljs.o: deps/quickjs/libquickjs.a
3029

3130
deps/quickjs/quickjs.h:
3231
mkdir -p deps
3332
git submodule update --init --recursive
3433
patch -p1 <patches/01-shared-lib-build
3534

36-
deps/quickjs/libquickjs.a:
35+
deps/quickjs/libquickjs.a: deps/quickjs/quickjs.h
3736
cd deps/quickjs && make
3837

3938
format:
@@ -45,23 +44,12 @@ pljs--$(PLJS_VERSION).sql: pljs.sql
4544
lintcheck:
4645
clang-tidy $(SRCS) -- -I$(INCLUDEDIR) -I$(INCLUDEDIR_SERVER) -I$(PWD) --std=c11
4746

48-
.depend: deps/quickjs/quickjs.h
49-
$(RM) -f .depend
50-
$(foreach SRC,$(SRCS),$(CC) $(PG_CFLAGS) -I$(INCLUDEDIR) -I$(INCLUDEDIR_SERVER) \
51-
-I$(PWD) -MM -MT $(SRC:.c=.o) $(SRC) >> .depend;)
52-
47+
all: deps/quickjs/quickjs.h deps/quickjs/libquickjs.a pljs--$(PLJS_VERSION).sql
5348

54-
all: deps/quickjs/libquickjs.a pljs--$(PLJS_VERSION).sql
55-
56-
clean: cleandepend cleansql
57-
58-
cleandepend:
59-
$(RM) -f .depend
49+
clean: cleansql
6050

6151
cleansql:
6252
$(RM) -f pljs--$(PLJS_VERSION).sql
6353

6454
docs:
6555
doxygen src/Doxyfile
66-
67-
include .depend

0 commit comments

Comments
 (0)