Debian Codegraph @

Makefile

raw
1 all:
2
3 # Include setting from the configure script
4 -include config.make
5
6 #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
7
8 override CFLAGS += -O2
9
10 # LDFLAGS += -fsanitize=address
11
12 DEPS=$(wildcard *.d)
13 PSPG_OFILES=csv.o print.o commands.o unicode.o themes.o pspg.o config.o sort.o pgclient.o args.o infra.o \
14 table.o string.o export.o linebuffer.o bscommands.o readline.o inputs.o theme_loader.o
15
16 OBJS=$(PSPG_OFILES)
17
18 ifdef COMPILE_MENU
19 ST_MENU_OFILES=st_menu.o st_menu_styles.o menu.o
20 OBJS+=$(ST_MENU_OFILES)
21 endif
22
23 all: pspg
24
25 st_menu_styles.o: src/st_menu_styles.c config.make
26 $(CC) src/st_menu_styles.c -c $(CPPFLAGS) $(CFLAGS)
27
28 st_menu.o: src/st_menu.c config.make
29 $(CC) src/st_menu.c -c $(CPPFLAGS) $(CFLAGS)
30
31 csv.o: src/pspg.h src/unicode.h src/pretty-csv.c
32 $(CC) -c src/pretty-csv.c -o csv.o $(CPPFLAGS) $(CFLAGS)
33
34 args.o: src/pspg.h src/args.c
35 $(CC) -c src/args.c -o args.o $(CPPFLAGS) $(CFLAGS)
36
37 print.o: src/pspg.h src/unicode.h src/print.c
38 $(CC) -c src/print.c -o print.o $(CPPFLAGS) $(CFLAGS)
39
40 commands.o: src/pspg.h src/commands.h src/commands.c
41 $(CC) -c src/commands.c -o commands.o $(CPPFLAGS) $(CFLAGS)
42
43 config.o: src/config.h src/config.c
44 $(CC) -c src/config.c -o config.o $(CPPFLAGS) $(CFLAGS)
45
46 unicode.o: src/unicode.h src/unicode.c
47 $(CC) -c src/unicode.c -o unicode.o $(CPPFLAGS) $(CFLAGS)
48
49 themes.o: src/themes.h src/themes.c
50 $(CC) -c src/themes.c -o themes.o $(CPPFLAGS) $(CFLAGS)
51
52 sort.o: src/pspg.h src/sort.c
53 $(CC) -c src/sort.c -o sort.o $(CPPFLAGS) $(CFLAGS)
54
55 menu.o: src/pspg.h src/st_menu.h src/commands.h src/menu.c
56 $(CC) -c src/menu.c -o menu.o $(CPPFLAGS) $(CFLAGS)
57
58 pgclient.o: src/pspg.h src/pgclient.c
59 $(CC) -c src/pgclient.c -o pgclient.o $(CPPFLAGS) $(CFLAGS) $(PG_CPPFLAGS)
60
61 infra.o: src/pspg.h src/infra.c
62 $(CC) -c src/infra.c -o infra.o $(CPPFLAGS) $(CFLAGS)
63
64 table.o: src/pspg.h src/table.c
65 $(CC) -c src/table.c -o table.o $(CPPFLAGS) $(CFLAGS)
66
67 string.o: src/pspg.h src/string.c
68 $(CC) -c src/string.c -o string.o $(CPPFLAGS) $(CFLAGS)
69
70 export.o: src/pspg.h src/export.c
71 $(CC) -c src/export.c -o export.o $(CPPFLAGS) $(CFLAGS)
72
73 linebuffer.o: src/pspg.h src/linebuffer.c
74 $(CC) -c src/linebuffer.c -o linebuffer.o $(CPPFLAGS) $(CFLAGS)
75
76 readline.o: src/pspg.h src/readline.c
77 $(CC) src/readline.c -c $(CPPFLAGS) $(CFLAGS)
78
79 inputs.o: src/pspg.h src/inputs.h src/inputs.c
80 $(CC) src/inputs.c -c $(CPPFLAGS) $(CFLAGS)
81
82 bscommands.o: src/pspg.h src/bscommands.c
83 $(CC) src/bscommands.c -c $(CPPFLAGS) $(CFLAGS)
84
85 theme_loader.o: src/pspg.h src/themes.h src/theme_loader.c
86 $(CC) src/theme_loader.c -c $(CPPFLAGS) $(CFLAGS)
87
88 pspg.o: src/commands.h src/config.h src/unicode.h src/themes.h src/inputs.h src/pspg.c
89 $(CC) -c src/pspg.c -o pspg.o $(CPPFLAGS) $(CFLAGS)
90
91 pspg: $(PSPG_OFILES) $(ST_MENU_OFILES) config.make
92 $(CC) $(PSPG_OFILES) $(ST_MENU_OFILES) -o pspg $(LDFLAGS) $(LDLIBS) $(PG_LFLAGS) $(PG_LDFLAGS) $(PG_LIBS)
93
94 man:
95 ronn --manual="pspg manual" --section=1 < README.md > pspg.1
96
97 clean:
98 $(RM) $(ST_MENU_OFILES)
99 $(RM) $(PSPG_OFILES)
100 $(RM) $(DEPS)
101 $(RM) pspg
102
103 distclean: clean
104 $(RM) -r autom4te.cache
105 $(RM) aclocal.m4 configure
106 $(RM) config.h config.log config.make config.status config.h.in
107
108 install: all
109 tools/install.sh bin pspg "$(DESTDIR)$(bindir)"
110
111 man-install:
112 tools/install.sh data pspg.1 "$(mandir)/man1"
113
114 strip-install: all
115 strip pspg
116 tools/install.sh bin pspg "$(DESTDIR)$(bindir)"
117
118 # Pull-in dependencies generated by -MD
119 -include $(OBJS:.o=.d)