summaryrefslogtreecommitdiff
path: root/rosetta/rosetta-makefile.patch
blob: 73efd99535750f2bed4d604815bc14732e48acb4 (plain)
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
diff -u rosetta.orig/Makefile rosetta/Makefile
--- rosetta.orig/Makefile	2003-09-28 00:37:58.000000000 +1000
+++ rosetta/Makefile	2004-04-29 13:16:23.000000000 +1000
@@ -20,45 +20,30 @@
 PACKAGE      = rosetta
 GTK_PACKAGE  = rosettalearn
 CVSBUILD     = yes
-
 BUILD = build
-
 VERSION = 0.01
 
 DESTDIR =
-PREFIX  = /usr/local
+PREFIX  = /usr
 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
-CFLAGS += $(GPECFLAGS)
+
+PACKAGE_CPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" $(OPTIONS)
+PACKAGE_CPPFLAGS += -DGTK_PACKAGE=\"$(GTK_PACKAGE)\"
+PACKAGE_CPPFLAGS += -DPREFIX=\"$(PREFIX)\"
+PACKAGE_CPPFLAGS += -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\" 
+PACKAGE_CPPFLAGS += -DPACKAGE_DATA_DIR=\"$(PREFIX)/share/\"
+PACKAGE_CPPFLAGS += -DENABLE_NLS
+
+PACKAGE_CFLAGS += `pkg-config --cflags gtk+-2.0 libgpewidget x11 xrandr xrender xft xtst xext xau`
+PACKAGE_LDFLAGS += `pkg-config --libs gtk+-2.0 libgpewidget x11 xrandr xrender xft xtst xext xau`
+PACKAGE_LDFLAGS += -L/skiff/local/arm-linux/lib
+PACKAGE_LDFLAGS += -L/skiff/local/arm-linux/lib/X11
+PACKAGE_LDFLAGS += -lm
+
 #CFLAGS += -DDEBUG
 
 .SUFFIXES: .d .c
@@ -77,11 +62,15 @@
 all: $(PACKAGE) $(GTK_PACKAGE)
 
 $(PACKAGE): $(OBJS)
-	$(CC) -o $@ $^ $(LDFLAGS)
+	$(CC) -o $@ $^ $(PACKAGE_LDFLAGS) $(LDFLAGS)
 	
 $(GTK_PACKAGE): $(GTK_OBJS)
-	$(CC) -o $@ $^ $(LDFLAGS) $(GPELIBS) -lXrender -lXinerama
+	$(CC) -o $@ $^ $(LDFLAGS) $(PACKAGE_LDFLAGS) $(GPELIBS)
+
+.c.o:;
+	$(CC) $(PACKAGE_CPPFLAGS) $(PACKAGE_CFLAGS) -c $< -o $@
 
+install: install-program
 install-program: all 
 	install -D $(PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(PACKAGE)
 	install -D $(GTK_PACKAGE) $(DESTDIR)$(PREFIX)/bin/$(GTK_PACKAGE)
@@ -92,7 +81,7 @@
 	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 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