This repository was archived by the owner on Nov 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (44 loc) · 1.2 KB
/
Makefile
File metadata and controls
57 lines (44 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Makefile
PIL_MODULE_DIR ?= .modules
PIL_SYMLINK_DIR ?= .lib
## Edit below
BUILD_REPO = https://github.com/aw/neon-unofficial-mirror.git
BUILD_DIR = $(PIL_MODULE_DIR)/neon/HEAD
BUILD_REF = 0.30.1
LIB_DIR = src/.libs
TARGET = libneon.so
BFLAGS = --enable-shared --with-ssl=openssl --enable-threadsafe-ssl=posix
## Edit above
# Unit testing
TEST_REPO = https://github.com/aw/picolisp-unit.git
TEST_DIR = $(PIL_MODULE_DIR)/picolisp-unit/HEAD
# Generic
COMPILE = make
.PHONY: all clean
all: $(BUILD_DIR) $(BUILD_DIR)/$(LIB_DIR)/$(TARGET) symlink
$(BUILD_DIR):
mkdir -p $(BUILD_DIR) && \
git clone $(BUILD_REPO) $(BUILD_DIR)
$(TEST_DIR):
mkdir -p $(TEST_DIR) && \
git clone $(TEST_REPO) $(TEST_DIR)
$(BUILD_DIR)/$(LIB_DIR)/$(TARGET):
cd $(BUILD_DIR) && \
git checkout $(BUILD_REF) && \
./autogen.sh && \
./configure $(BFLAGS) && \
$(COMPILE) && \
strip --strip-unneeded $(LIB_DIR)/$(TARGET)
symlink:
mkdir -p $(PIL_SYMLINK_DIR) && \
cd $(PIL_SYMLINK_DIR) && \
ln -sf ../$(BUILD_DIR)/$(LIB_DIR)/$(TARGET) $(TARGET)
check: all $(TEST_DIR) run-tests
run-tests:
./test.l
clean:
cd $(BUILD_DIR)/$(LIB_DIR) && \
rm -f $(TARGET) && \
cd - && \
cd $(PIL_SYMLINK_DIR) && \
rm -f $(TARGET)