Skip to content

Commit 8d3391b

Browse files
committed
examples/Makefile w/o config.mk
1 parent ca08b92 commit 8d3391b

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ jobs:
6262

6363
- name: Build tools
6464
run: make tools
65+
66+
- name: Build examples
67+
run: make examples
6568

6669
build-freebsd:
6770
runs-on: ubuntu-latest

config.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ CHECKOPTS += --inline-suppr $(CHECKEXTRA)
5959
# Below are some generated constants based on the one that were set above
6060
# ============================================================================
6161

62+
# Id XCHANGE is defined convert to absolute path for sub-makes.
63+
ifdef XCHANGE
64+
XCHANGE := $(shell cd $(XCHANGE); pwd)
65+
export XCHANGE
66+
endif
67+
6268
ifneq ($(shell which ldconfig), )
6369
# Detect OpenSSL automatically, and enable TLS support if present
6470
ifndef WITH_TLS

examples/Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
#
55
# Author: Attila Kovacs
66

7-
# Use the definitions project definitions
8-
include ../config.mk
9-
107
EXAMPLES = $(subst .c,,$(wildcard *.c))
118

129
LIB ?= ../lib
1310

11+
ifdef XCHANGE
12+
CPPFLAGS += -I$(XCHANGE)/include
13+
LDFLAGS += -L$(XCHANGE)/lib
14+
endif
15+
1416
CPPFLAGS += -I../include
15-
LDFLAGS += -L$(LIB) -lxchange -lpthread
17+
LDFLAGS += -L$(LIB) -lredisx -lxchange -lpthread
18+
1619

1720
.PHONY: all
1821
all: $(EXAMPLES)

examples/hello

12.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)