-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (35 loc) · 896 Bytes
/
Copy pathMakefile
File metadata and controls
49 lines (35 loc) · 896 Bytes
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
#
# See Makefile.config for configuration options
#
all: gterm
include Makefile.config
LIBOBJS = actions.o states.o utils.o gterm.o pseudo.o vt52_states.o
GOBJS = xintfc.o xkeys.o
ifeq ($(PTY_CODE),openpty)
CPPFLAGS += -DUSE_OPENPTY
LDFLAGS += -lutil
endif
ifeq ($(PTY_CODE),unix98)
CPPFLAGS += -DUSE_UNIX98
endif
ifeq ($(PTY_CODE),classic)
CPPFLAGS += -DUSE_CLASSIC_PTY
endif
.PHONY: all clean install
libgterm.a: $(LIBOBJS)
rm -f $@ || exit 0
ar csq $@ $(LIBOBJS)
gterm: $(GOBJS) libgterm.a
$(CXX) $(CXXFLAGS) -o $@ $(GOBJS) $(LDFLAGS)
%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@
clean:
-rm -f *.o *.i libgterm.a gterm
install: all
mkdir -p $(DESTDIR)$(bindir)
install -m $(BIN_MODE) -o $(BIN_OWNER) -g $(BIN_GROUP) gterm $(DESTDIR)$(bindir)/gterm
# dependency tracing for header files, used for pseudo.hpp
%.hpp:
touch $@
# dependencies
include Makefile.depend