Skip to content

Commit

Permalink
adds back depend and lintcheck, some minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JerrySievert committed Apr 10, 2024
1 parent 971bdb6 commit 14265d0
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: duckdb install_duckdb
.PHONY: duckdb install_duckdb clean_duckdb lintcheck

MODULE_big = quack
EXTENSION = quack
Expand All @@ -18,6 +18,8 @@ PG_CONFIG ?= pg_config

PGXS := $(shell $(PG_CONFIG) --pgxs)
PG_LIB := $(shell $(PG_CONFIG) --pkglibdir)
INCLUDEDIR := ${shell $(PG_CONFIG) --includedir}
INCLUDEDIR_SERVER := ${shell $(PG_CONFIG) --includedir-server}

DEBUG_FLAGS = -g -O0 -fsanitize=address
override PG_CPPFLAGS += -Iinclude -Ithird_party/duckdb/src/include -std=c++17
Expand Down Expand Up @@ -53,5 +55,17 @@ third_party/duckdb/build/debug/src/$(DUCKDB_LIB):
install_duckdb:
$(install_bin) -m 755 third_party/duckdb/build/debug/src/$(DUCKDB_LIB) $(DESTDIR)$(PG_LIB)

clean_duckdb:
rm -rf third_party/duckdb/build

install: install_duckdb
clean: clean_duckdb

lintcheck:
clang-tidy $(SRCS) -- -I$(INCLUDEDIR) -I$(INCLUDEDIR_SERVER) -Iinclude $(CPPFLAGS) -std=c++17

.depend:
$(RM) -f .depend
$(foreach SRC,$(SRCS),$(CXX) $(CPPFLAGS) -I$(INCLUDEDIR) -I$(INCLUDEDIR_SERVER) -MM -MT $(SRC:.cpp=.o) $(SRC) >> .depend;)

include .depend

0 comments on commit 14265d0

Please sign in to comment.