File: Makefile

package info (click to toggle)
rotix 0.83-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 200 kB
  • sloc: ansic: 281; sh: 152; makefile: 62
file content (99 lines) | stat: -rw-r--r-- 2,311 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
##########################
#   Makefile for Rotix   #
##########################
#
#	Rotix - A program to generate rotational obfuscations
#	Copyright (C) 2001  Sjoerd Hemminga <sjoerd@huiswerkservice.nl>
#
#	This program is free software; you can redistribute it and/or modify
#	it under the terms of the GNU General Public License as published by
#	the Free Software Foundation; either version 2 of the License, or
#	(at your option) any later version.
#
#	This program is distributed in the hope that it will be useful, but
#	WITHOUT ANY WARRANTY; without even the implied warranty of
#	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
#	General Public License for more details.
#
#	You should have received a copy of the GNU General Public License
#	along with this program; if not, write to the Free Software
#	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
#	USA 

include Makefile.settings

ifdef DEBUG
CFLAGS += -g3
else
CFLAGS += -O3
endif

ifdef I18N
CFLAGS += -DPACKAGE=\"${PACKAGE}\" -D LOCALEDIR=\"${LOCALE}\"
endif

ifdef NO_GETOPT_LONG
CFLAGS += -D NO_GETOPT_LONG=1
endif

all : rotix po

rotix : rot.o help.o rotix.o
	$(CC) -Wall $(CFLAGS) $(LDFLAGS) -o rotix rot.o help.o rotix.o
#ifdef STRIP
#ifndef DEBUG
#	$(STRIP) rotix
#endif
#endif

ifdef I18N
CFLAGS += -D I18N=1
endif

rot.o : rot.c
	$(CC) -Wall $(CPPFLAGS) $(CFLAGS) -c rot.c

help.o : help.c
	$(CC) -Wall $(CPPFLAGS) $(CFLAGS) -c help.c

rotix.o : rotix.c
	$(CC) -Wall $(CPPFLAGS) $(CFLAGS) -c rotix.c

po : po/NL.mo

po/NL.mo : po/NL.po
	msgfmt -o po/NL.mo po/NL.po

.PHONY : clean rmbin distclean cleanall

cleanall : distclean

distclean : clean rmbin
	rm Makefile.settings

clean :
	rm -f *.o

rmbin :
	rm -f rotix
	rm -f po/*.mo

install: rotix po
	mkdir -p $(DESTDIR)$(BINDIR)
	cp rotix $(DESTDIR)$(BINDIR)
	chmod 0755 $(DESTDIR)$(BINDIR)/rotix
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	cp rotix.1 $(DESTDIR)$(MANDIR)/man1
	chmod 0644 $(DESTDIR)$(MANDIR)/man1/rotix.1
ifdef I18N
	mkdir -p $(DESTDIR)$(LOCALE)/nl/LC_MESSAGES
	cp po/NL.mo $(DESTDIR)$(LOCALE)/nl/LC_MESSAGES/rotix.mo
	chmod 0644 $(DESTDIR)$(LOCALE)/nl/LC_MESSAGES/rotix.mo
endif
	
uninstall:
	rm -f $(DESTDIR)$(BINDIR)/rotix
	rm -f $(DESTDIR)$(MANDIR)/man1/rotix.1
ifdef I18N
	rm -f $(DESTDIR)$(LOCALE)/nl/LC_MESSAGES/rotix.mo
endif