-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (40 loc) · 1.47 KB
/
Makefile
File metadata and controls
48 lines (40 loc) · 1.47 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
# Copyright 2012-2026 Mitchell. See LICENSE.
.SUFFIXES: .cxx .c .o .h .a
srcdir ?= .
basedir = $(srcdir)/..
AR = ar
CC = gcc
CXX = g++
CXX_BASE_FLAGS = -std=c++17 -pedantic -DCURSES -DSCI_LEXER -D_XOPEN_SOURCE_EXTENDED \
-I$(basedir)/include -I$(basedir)/src -Wall
ifdef DEBUG
CXX_BASE_FLAGS += -DDEBUG -g
else
CXX_BASE_FLAGS += -DNDEBUG -Os
endif
CURSES_FLAGS =
scintilla = ../bin/scintilla.a
sci = AutoComplete.o CallTip.o CaseConvert.o CaseFolder.o CellBuffer.o ChangeHistory.o \
CharacterCategoryMap.o CharacterType.o CharClassify.o ContractionState.o DBCS.o Decoration.o \
Document.o EditModel.o Editor.o EditView.o Geometry.o Indicator.o KeyMap.o LineMarker.o \
MarginView.o PerLine.o PositionCache.o RESearch.o RunStyles.o ScintillaBase.o Selection.o \
Style.o UndoHistory.o UniConversion.o UniqueString.o ViewStyle.o XPM.o
wcwidth = wcwidth.o
vpath %.h $(srcdir) $(basedir)/src $(basedir)/include
vpath %.cxx $(srcdir) $(basedir)/src
vpath %.c $(srcdir)
all: $(scintilla)
$(sci) PlatCurses.o ScintillaCurses.o: %.o: %.cxx
$(CXX) $(CXX_BASE_FLAGS) $(CXXFLAGS) $(CURSES_FLAGS) -c $<
$(wcwidth): %.o: %.c ; $(CC) $(CFLAGS) -c $<
$(scintilla): $(sci) PlatCurses.o ScintillaCurses.o $(wcwidth)
$(AR) rc $@ $^
touch $@
patch: $(wildcard patches/*.patch)
@for patch in $^; do \
echo "Applying $$patch"; \
patch -d ../ -N -p1 < $$patch; \
done
clean: ; rm -f *.o $(scintilla)
# Documentation.
docs/api.md: docs/scinterm.luadoc ; ldoc --filter docs.markdowndoc.ldoc $^ > $@