File: Makefile.in

package info (click to toggle)
dact 0.8.42-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, sid, stretch, wheezy
  • size: 1,404 kB
  • sloc: ansic: 5,923; sh: 2,748; makefile: 141
file content (137 lines) | stat: -rw-r--r-- 5,045 bytes parent folder | download | duplicates (2)
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
CC = @CC@
CFLAGS = @CFLAGS@ @DEFS@
CPPFLAGS = @CPPFLAGS@

EXEEXT = @EXEEXT@
OBJEXT = @OBJEXT@
PATH_SEPARATOR = @PATH_SEPARATOR@

LD = @CC@
AR = @AR@
RANLIB = @RANLIB@
LOADLIBES = 
LDLIBS += @LIBS@ @MODLIBS@ -lm @NOMODS@ @MODLIBSCOND@
LDFLAGS += @LDFLAGS@

SHOBJFLAGS = @SHOBJFLAGS@
SHOBJLDFLAGS = @SHOBJLDFLAGS@
SHOBJEXT = @SHOBJEXT@

MODLIBS = @MODLIBS@

INSTALL = @INSTALL@
@SET_MAKE@

prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
bindir = @bindir@
sysconfdir = @sysconfdir@
mandir = @mandir@
datadir = @datadir@

CONF = $(sysconfdir)/dact.conf
CFLAGS += -DDACT_CONFIG_FILE=\"$(CONF)\" -DEXEEXT=\"$(EXEEXT)\"
#CFLAGS += -O3
#LDFLAGS += -static

DEBUGALGO = comp_bitsums.c comp_factor.c comp_textrle.c
OBJS += dact_common.o comp_fail.o comp_plain.o buffer.o header.o sort.o dact.o module.o parse.o dendian.o crc.o net.o ui.o sfx.o libdact.o @LIBOBJS@
# Note that the following lacks "dact_shr.o" but otherwise MUST
# be kept in sync with OBJS
SHLIBOBJS += dact_common_shr.o comp_fail_shr.o comp_plain_shr.o buffer_shr.o header_shr.o sort_shr.o module_shr.o parse_shr.o dendian_shr.o crc_shr.o net_shr.o ui_shr.o sfx_shr.o libdact_shr.o @SHLIBOBJS@
ALGO = comp_snibble.c comp_delta.c comp_text.c comp_rle.c cipher_chaos.c cipher_sub.c cipher_psub.c @ALGO@

TOBUILD = dact$(EXEEXT) libdact.$(SHOBJEXT) libdact.a dact.conf

all: @DEFAULT@

module: @DEPEND@
	@MODS="$(ALGO:.c=.so)" LDLIBS="@ALLMODLIBS@" \
	  $(MAKE) $(TOBUILD)

static: @DEPEND@
	@OBJS="$(ALGO:.c=.o) $(CR_OBJ)" SHLIBOBJS="$(ALGO:.c=_shr.o)" LDLIBS="$(MODLIBS)" $(MAKE) $(TOBUILD)

dact.conf: Makefile
	@echo "version_check    off" > dact.conf
	@echo "#block_size      0" >> dact.conf
	@echo "#exclude_algo    0" >> dact.conf
	@echo "use_urls         on" >> dact.conf
	@echo "color_ui         off" >> dact.conf
	@echo "network_access   on" >> dact.conf
	@echo "binary_check     off" >> dact.conf
#	@echo "module_dir       $(datadir)/dact" >> dact.conf
	@echo "module_load_all  off" >> dact.conf
@MODS@	@for so in $(MODS:.so=); do echo "load_module	$$so" >> dact.conf; done

dact$(EXEEXT): $(OBJS) $(MODS)
	$(CC) $(OBJS) $(LIBS) -o dact$(EXEEXT) $(LDLIBS) $(LDFLAGS)

libdact.$(SHOBJEXT): $(SHLIBOBJS)
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -o $@ $^ $(LDLIBS) $(LDFLAGS) $(SHOBJLDFLAGS)

libdact.a: $(OBJS)
	@AR@ rcu libdact.a $(filter-out dact.o, $^)
	-@RANLIB@ libdact.a

%_shr.o: %.c
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -c -o $@ $?

%.so: %.c %.lnk
	@echo $(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -o $@ -DAS_MODULE $(SHOBJLDFLAGS) $(LDFLAGS) $< $(filter %.o, $^) `cat $(<:.c=.lnk)`; \
	$(CC) $(CPPFLAGS) $(CFLAGS) $(SHOBJFLAGS) -o $@ -DAS_MODULE $(SHOBJLDFLAGS) $(LDFLAGS) $< $(filter %.o, $^) `cat $(<:.c=.lnk)`

.PHONY: clean distclean install-bin install mrproper install-local install-bin-local uninstall depend
clean:
	rm -f dact dact$(EXEEXT) libdact.$(SHOBJEXT) libdact.$(SHOBJEXT).def libdact.$(SHOBJEXT).a libdact.a core *~ $(ALGO:.c=.so) *.o

distclean: clean
	rm -f Makefile config.h config.status config.log config.cache

mrproper: distclean
	rm -rf Makefile.dep configure autom4te.cache/ config.h.in

install-bin: dact$(EXEEXT)
	-$(INSTALL) -d $(bindir)
	$(INSTALL) -m 755 dact$(EXEEXT) $(bindir)/dact$(EXEEXT)

install: all install-bin
	-$(INSTALL) -d $(mandir)/man1
	-$(INSTALL) -d $(libdir)
	-$(INSTALL) -d $(datadir)/dact
	-$(INSTALL) -d $(sysconfdir)
	$(INSTALL) -m 644 dact.conf $(CONF)
	$(INSTALL) -m 644 Docs/dact.1 $(mandir)/man1/dact.1
	-$(INSTALL) -m 755 libdact.$(SHOBJEXT) $(libdir)/libdact.$(SHOBJEXT)
	-$(INSTALL) -m 644 libdact.$(SHOBJEXT).def $(libdir)/libdact.$(SHOBJEXT).def || :
	-$(INSTALL) -m 644 libdact.$(SHOBJEXT).a $(libdir)/libdact.$(SHOBJEXT).a || :
	-$(INSTALL) -m 644 libdact.a $(libdir)/libdact.a
@MODS@	for so in $(MODS); do $(INSTALL) -m 755 $$so $(datadir)/dact/$$so; done
#	./patch-magic-file $(datadir)/dact/magic

install-bin-local: dact$(EXEEXT)
	-$(INSTALL) -d $(HOME)/.dact/`uname -s | tr A-Z a-z`-`uname -m`
	$(INSTALL) -m 755 dact$(EXEEXT) $(HOME)/.dact/`uname -s | tr A-Z a-z`-`uname -m`/dact$(EXEEXT)

install-local: all install-bin-local
	-$(INSTALL) -d $(HOME)/.dact/`uname -s | tr A-Z a-z`-`uname -m`
	$(INSTALL) -m 644 dact.conf $(HOME)/.dact/dact.conf
	-$(INSTALL) -m 644 libdact.a $(HOME)/.dact/`uname -s | tr A-Z a-z`-`uname -m`/dact$(EXEEXT)
	-$(INSTALL) -m 755 libdact.$(SHOBJEXT) $(HOME)/.dact/`uname -s | tr A-Z a-z`-`uname -m`/dact$(EXEEXT)
@MODS@	for so in $(MODS); do $(INSTALL) -m 755 $$so $(HOME)/.dact/`uname -s | tr A-Z a-z`-`uname -m`/$$so; done

uninstall:
	rm -f $(bindir)/dact$(EXEEXT)
	rm -f $(mandir)/man1/dact.1 $(CONF)
	rm -f $(libdir)/libdact.a $(libdir)/libdact.$(SHOBJEXT)
@MODS@	rm -rf $(datadir)/dact

depend: Makefile.dep

Makefile.dep: *.c *.h Makefile
	@echo "building Makefile.dep"
	@$(CC) $(CFLAGS) $(CPPFLAGS) -MM $(ALGO) $(OBJS:.o=.c) $(MODS:.so=.c) dact.c > Makefile.dep
	@$(CC) $(CFLAGS) $(CPPFLAGS) -MM $(ALGO) $(filter-out libdact.c, $(OBJS:.o=.c)) $(MODS:.so=.c) dact.c  | sed -e "s/^\([^ ]*\)\.o: /\1.so: /g" >> Makefile.dep

include Makefile.dep