blob: 6ea767a7a2da02ed8bb17c70e359c18f535e1ba1 (
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
|
--- a/calendarfunc.c
+++ b/calendarfunc.c
@@ -22,7 +22,7 @@
#include "calendarfunc.h"
#include <stdio.h>
-
+#include <math.h>
long persian_jdn(struct icaltimetype dt)
--- a/dockapp.c
+++ b/dockapp.c
@@ -23,6 +23,7 @@
* modified by Seiichi SATO <ssato@sh.rim.or.jp>
*/
+#include <stdlib.h>
#include "dockapp.h"
#define WINDOWED_SIZE_W 64
--- a/Makefile
+++ b/Makefile
@@ -1,19 +1,15 @@
-CC = gcc
+CC ?= gcc
INCLUDES = `pkg-config --cflags gtk+-2.0` -I.
-LFLAGS = `pkg-config --libs gtk+-2.0`
# for BSD
#INCLUDES = `gtk12-config --cflags` -I.
#LFLAGS = `gtk12-config --libs`
-X11BASE = /usr/X11R6
-CFLAGS = $(INCLUDES) -DICON_TYPE=$(ICON_TYPE)
-INCDIR = -I$(X11BASE)/include/X11 -I$(X11BASE)/include -I$/usr/include -I$/usr/local/include
-DESTDIR= /usr/local
-LIBDIR = -L/usr/lib -L${X11BASE}/lib -L/usr/local/lib
+CFLAGS += $(INCLUDES) -DICON_TYPE=$(ICON_TYPE)
+PREFIX = /usr
PACKAGE = wmCalendar
# for Linux
-LIBS = $(LIBDIR) -lXpm -lical -lpthread
+LIBS = -lpthread -lm $(shell $(PKG_CONFIG) --libs gtk+-2.0 x11 xpm xext libical)
# for Solaris (untested!!!)
# LIBS = -lXpm -lX11 -lXext -lsocket -lnsl -lical
@@ -30,7 +26,7 @@
all: wmCalendar.o wmCalendar
wmCalendar: $(OBJECTS)
- $(CC) $(COPTS) $(SYSTEM) $(LFLAGS) -o $@ $(OBJECTS) -o wmCalendar $(INCDIR)$(LIBDIR) $(LIBS)
+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $@
wmCalendar.o: wmCalendar_master.xpm wmCalendar_master2.xpm
clean:
@@ -40,6 +36,8 @@
rm -f wmCalendar
install:: wmCalendar
- install -c -s -m 0755 wmCalendar $(DESTDIR)/bin/
- install -c -m 0644 wmCalendar.1 $(DESTDIR)/man/man1
+ install -d $(DESTDIR)$(PREFIX)/bin
+ install -m 0755 wmCalendar $(DESTDIR)$(PREFIX)/bin
+ install -d $(DESTDIR)$(PREFIX)/share/man/man1
+ install -m 0644 wmCalendar.1 $(DESTDIR)$(PREFIX)/share/man/man1
|