-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
108 lines (81 loc) · 3.39 KB
/
Makefile
File metadata and controls
108 lines (81 loc) · 3.39 KB
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
# Makefile - makefile for rosetta
# (c) 2003 Ole Reinhardt <ole.reinhardt@kernelconcepts.de>
#
# 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 Library 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.
CROSSCOMPILE = no
PACKAGE = rosetta
GTK_PACKAGE = rosettalearn
CVSBUILD = no
BUILD = build
VERSION = 0.01
DESTDIR =
PREFIX = /usr/local
OPTIONS = -DNEW_NORMALIZE_CODE -DNEW_MATCH_CODE
ifeq ($(CROSSCOMPILE),yes)
CC = arm-linux-gcc
STRIP = arm-linux-strip
PKG_CONFIG_PATH=/skiff/local/arm-linux/lib/pkgconfig/
LDFLAGS += -L/skiff/local/arm-linux/lib
LDFLAGS += -L/skiff/local/arm-linux/lib/X11
LDFLAGS += -lX11 -lXtst -lXext -lm
else
CC = gcc
STRIP = strip
LDFLAGS += -L/usr/X11R6/lib -lX11 -lXtst -lm
endif
CONTROL = control
CFLAGS += -Os -Wall
CFLAGS += -MD $(OPTIONS) -g
CFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DGTK_PACKAGE=\"$(GTK_PACKAGE)\" -DPREFIX=\"$(PREFIX)\"
CFLAGS += -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
CFLAGS += -DPACKAGE_DATA_DIR=\"$(PREFIX)/share/\"
CFLAGS += -I$(GPE_DIR)/libgpewidget
CFLAGS += -DENABLE_NLS -D_GNU_SOURCE
CFLAGS += $(GPECFLAGS)
#CFLAGS += -DDEBUG
.SUFFIXES: .d .c
MEMBERS = precalc database analize normalize matching helper
MEMBERS += dictionary libvirtkeys configfile main
GTK_MEMBERS = precalc database analize normalize matching helper
GTK_MEMBERS += dictionary libvirtkeys configfile callbacks gui_learn learn
OBJS = $(patsubst %,%.o,$(MEMBERS))
GTK_OBJS = $(patsubst %,%.o,$(GTK_MEMBERS))
DEPS = $(patsubst %,%.d,$(MEMBERS)) $(patsubst %,%.d,$(GTK_MEMBERS))
all: $(PACKAGE) $(GTK_PACKAGE)
$(PACKAGE): $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS)
$(GTK_PACKAGE): $(GTK_OBJS)
$(CC) -o $@ $^ $(LDFLAGS) $(GPELIBS) -lXrender -lXinerama
install-program: all
install -D $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
install -D $(GTK_PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(GTK_PACKAGE)
$(STRIP) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
$(STRIP) $(DESTDIR)$(PREFIX)/bin/$(GTK_PACKAGE)
mkdir -p $(DESTDIR)$(PREFIX)/share/pixmaps
mkdir -p $(DESTDIR)$(PREFIX)/share/$(PACKAGE)
mkdir -p $(DESTDIR)/etc
install -m 644 $(PACKAGE).png $(DESTDIR)$(PREFIX)/share/pixmaps/$(PACKAGE).png
install -m 644 penwrite24.png $(DESTDIR)$(PREFIX)/share/pixmaps/penwrite24.png
install -m 644 $(PACKAGE).pc $(DESTDIR)$(PREFIX)/share/$(PACKAGE)
install -m 666 $(PACKAGE).db $(DESTDIR)$(PREFIX)/share/$(PACKAGE)
install -m 644 $(PACKAGE).conf $(DESTDIR)/etc
mkdir -p $(DESTDIR)$(PREFIX)/share/applications
mkdir -p $(DESTDIR)$(PREFIX)/share/applications/inputmethods
install -m 644 $(PACKAGE).desktop $(DESTDIR)$(PREFIX)/share/applications/inputmethods/
install -m 644 $(GTK_PACKAGE).desktop $(DESTDIR)$(PREFIX)/share/applications/
clean:
rm -f $(PACKAGE) $(OBJS) $(GTK_PACKAGE) $(GTK_OBJS) $(DEPS)
include $(BUILD)/Makefile.dpkg_ipkg
-include $(DEPS)