File: Makefile

package info (click to toggle)
pspg 5.8.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,360 kB
  • sloc: ansic: 23,354; sh: 101; makefile: 93; sql: 54
file content (117 lines) | stat: -rw-r--r-- 3,707 bytes parent folder | download | duplicates (3)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
all:

# Include setting from the configure script
-include config.make

# override CFLAGS += -g -O2 -Werror-implicit-function-declaration -D_POSIX_SOURCE=1 -std=c99  -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wjump-misses-init -Wdouble-promotion -Wshadow -pedantic -fstack-protector-all -fsanitize=address -fstack-protector -fstack-protector-strong

# LDFLAGS += -fsanitize=address

DEPS=$(wildcard *.d)
PSPG_OFILES=csv.o print.o commands.o unicode.o themes.o pspg.o config.o sort.o pgclient.o args.o infra.o \
table.o string.o export.o linebuffer.o bscommands.o readline.o inputs.o theme_loader.o

OBJS=$(PSPG_OFILES)

ifdef COMPILE_MENU
ST_MENU_OFILES=st_menu.o st_menu_styles.o menu.o
OBJS+=$(ST_MENU_OFILES)
endif

all: pspg

st_menu_styles.o: src/st_menu_styles.c config.make
	$(CC)  src/st_menu_styles.c -c $(CPPFLAGS) $(CFLAGS)

st_menu.o: src/st_menu.c config.make
	$(CC)  src/st_menu.c -c $(CPPFLAGS) $(CFLAGS)

csv.o: src/pspg.h src/unicode.h src/pretty-csv.c
	$(CC)  -c  src/pretty-csv.c -o csv.o $(CPPFLAGS) $(CFLAGS)

args.o: src/pspg.h src/args.c
	$(CC)  -c  src/args.c -o args.o $(CPPFLAGS) $(CFLAGS)

print.o: src/pspg.h src/unicode.h src/print.c
	$(CC)  -c  src/print.c -o print.o $(CPPFLAGS) $(CFLAGS)

commands.o: src/pspg.h src/commands.h src/commands.c
	$(CC)  -c src/commands.c -o commands.o $(CPPFLAGS) $(CFLAGS)

config.o: src/config.h src/config.c
	$(CC)  -c src/config.c -o config.o $(CPPFLAGS) $(CFLAGS)

unicode.o: src/unicode.h src/unicode.c
	$(CC)  -c src/unicode.c -o unicode.o $(CPPFLAGS) $(CFLAGS)

themes.o: src/themes.h src/themes.c
	$(CC)  -c src/themes.c -o themes.o $(CPPFLAGS) $(CFLAGS)

sort.o: src/pspg.h src/sort.c
	$(CC)  -c src/sort.c -o sort.o $(CPPFLAGS) $(CFLAGS)

menu.o: src/pspg.h src/st_menu.h src/commands.h src/menu.c
	$(CC)  -c src/menu.c -o menu.o $(CPPFLAGS) $(CFLAGS)

pgclient.o: src/pspg.h src/pgclient.c
	$(CC)  -c src/pgclient.c -o pgclient.o $(CPPFLAGS) $(CFLAGS) $(PG_CPPFLAGS)

infra.o: src/pspg.h src/infra.c
	$(CC)  -c src/infra.c -o infra.o $(CPPFLAGS) $(CFLAGS)

table.o: src/pspg.h src/table.c
	$(CC)  -c src/table.c -o table.o $(CPPFLAGS) $(CFLAGS)

string.o: src/pspg.h src/string.c
	$(CC)  -c src/string.c -o string.o $(CPPFLAGS) $(CFLAGS)

export.o: src/pspg.h src/export.c
	$(CC)  -c src/export.c -o export.o $(CPPFLAGS) $(CFLAGS)

linebuffer.o: src/pspg.h src/linebuffer.c
	$(CC)  -c src/linebuffer.c -o linebuffer.o $(CPPFLAGS) $(CFLAGS)

readline.o: src/pspg.h src/readline.c
	$(CC)  src/readline.c -c $(CPPFLAGS) $(CFLAGS)

inputs.o: src/pspg.h src/inputs.h src/inputs.c
	$(CC)  src/inputs.c -c $(CPPFLAGS) $(CFLAGS)

bscommands.o: src/pspg.h src/bscommands.c
	$(CC)  src/bscommands.c -c $(CPPFLAGS) $(CFLAGS)

theme_loader.o: src/pspg.h src/themes.h src/theme_loader.c
	$(CC)  src/theme_loader.c -c $(CPPFLAGS) $(CFLAGS)

pspg.o: src/commands.h src/config.h src/unicode.h src/themes.h src/inputs.h src/pspg.c
	$(CC)  -c src/pspg.c -o pspg.o $(CPPFLAGS) $(CFLAGS)

pspg:  $(PSPG_OFILES) $(ST_MENU_OFILES) config.make
	$(CC)  $(PSPG_OFILES) $(ST_MENU_OFILES) -o pspg $(LDFLAGS) $(LDLIBS) $(PG_LFLAGS) $(PG_LDFLAGS) $(PG_LIBS)

man:
	ronn --manual="pspg manual" --section=1 < README.md > pspg.1

clean:
	$(RM) $(ST_MENU_OFILES)
	$(RM) $(PSPG_OFILES)
	$(RM) $(DEPS)
	$(RM) pspg

distclean: clean
	$(RM) -r autom4te.cache
	$(RM) aclocal.m4 configure
	$(RM) config.h config.log config.make config.status config.h.in

install: all
	tools/install.sh bin pspg "$(DESTDIR)$(bindir)"

man-install:
	tools/install.sh data pspg.1 "$(mandir)/man1"

strip-install: all
	strip pspg
	tools/install.sh bin pspg "$(DESTDIR)$(bindir)"

# Pull-in dependencies generated by -MD
-include $(OBJS:.o=.d)