File: Makefile

package info (click to toggle)
zh-autoconvert 0.3.16-5
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 3,612 kB
  • sloc: ansic: 28,053; perl: 264; makefile: 84; python: 9
file content (44 lines) | stat: -rw-r--r-- 1,499 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
CC ?= gcc
CFLAGS := -O2 -g -Wall -Iinclude $(CFLAGS)
LIBS = -Llib -lhz

.PHONY: all hzlib clean install-home install

all: autob5 autogb hzlib  xchat-plugins

autob5: autogb
	rm -f autob5;ln -s autogb autob5
autogb:autogb.c  hzlib
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(LIBS) autogb.c -lhz -o autogb
autogb-static:autogb.c  hzlib
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) autogb.c lib/libhz.a -o autogb
hzlib:
	cd hzconvert; make -e
xchat-plugins: 
	cd contrib/xchat-plugins; make -e
clean:
	rm -f autob5 autogb *.o *~
	rm -f include/*~
	cd hzconvert;make clean
	cd contrib/xchat-plugins;make clean
install-home:
	[ ! -f $(HOME)/bin ] || mkdir $(HOME)/bin
	rm -f $(HOME)/bin/autob5
	rm -f $(HOME)/bin/autogb
	cp -f autogb $(HOME)/bin
	ln -s $(HOME)/bin/autogb $(HOME)/bin/autob5
	chmod 755 $(HOME)/bin/autogb 
install:
	install -d $(DESTDIR)/usr/bin
	install -d $(DESTDIR)/usr/lib
	install -d $(DESTDIR)/usr/include
	install -d $(DESTDIR)/usr/lib/zh-autoconvert
	install -m 755 autogb $(DESTDIR)/usr/bin
	install -m 755 lib/libhz.so.0.0 $(DESTDIR)/usr/lib
	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0.0 libhz.so.0
	cd $(DESTDIR)/usr/lib;ln -s  libhz.so.0 libhz.so
	install -m 755 lib/libhz.a $(DESTDIR)/usr/lib
	install -m 755 contrib/xchat-plugins/xchat-autogb.so $(DESTDIR)/usr/lib/zh-autoconvert
	install -m 755 contrib/xchat-plugins/xchat-autob5.so $(DESTDIR)/usr/lib/zh-autoconvert
	install -m 644 include/*.h  $(DESTDIR)/usr/include
	cd $(DESTDIR)/usr/bin; ln -s autogb $(DESTDIR)/usr/bin/autob5