comparison libgaim/plugins/perl/common/Makefile.mingw @ 14192:60b1bc8dbf37

[gaim-migrate @ 16863] Renamed 'core' to 'libgaim' committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Sat, 19 Aug 2006 01:50:10 +0000
parents
children 8793fc8f7064
comparison
equal deleted inserted replaced
14191:009db0b357b5 14192:60b1bc8dbf37
1 #
2 # Makefile.mingw
3 #
4 # Description: Makefile for Gaim perl module.
5 #
6
7 TARGET = Gaim
8 AUTOSPLIT = lib/auto/Gaim/autosplit.ix
9
10 ##
11 ## TOOLS
12 ##
13
14 CC := gcc
15 PERL := /cygdrive/c/perl/bin/perl
16
17 ##
18 ## PATHS
19 ##
20
21 EXTUTILS := C:/perl/lib/ExtUtils
22 GAIM_TOP := ../../..
23 GTK_TOP := ../../../../win32-dev/gtk_2_0
24 PERL_TOP := ../../../../win32-dev/perl58
25 PERL_PLUGIN_TOP := ..
26 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir
27 PERLMOD_INSTALL_DIR := $(GAIM_INSTALL_DIR)/perlmod
28
29
30 INCLUDE_PATHS = -I. \
31 -I$(GAIM_TOP) \
32 -I$(GAIM_TOP)/src \
33 -I$(GTK_TOP)/include \
34 -I$(GTK_TOP)/include/gtk-2.0 \
35 -I$(GTK_TOP)/include/glib-2.0 \
36 -I$(GTK_TOP)/include/pango-1.0 \
37 -I$(GTK_TOP)/include/atk-1.0 \
38 -I$(GTK_TOP)/lib/gtk-2.0/include \
39 -I$(GTK_TOP)/lib/glib-2.0/include \
40 -I$(PERL_TOP)/CORE
41
42 LIB_PATHS = -L$(PERL_TOP) \
43 -L$(PERL_PLUGIN_TOP) \
44 -L$(GAIM_TOP)/src \
45 -L$(GTK_TOP)/lib
46
47
48 ##
49 ## SOURCES, OBJECTS
50 ##
51
52 XS_FILES = Account.xs \
53 AccountOpts.xs \
54 BuddyIcon.xs \
55 BuddyList.xs \
56 Cipher.xs \
57 Cmds.xs \
58 Connection.xs \
59 Conversation.xs \
60 Debug.xs \
61 FT.xs \
62 Gaim.xs \
63 ImgStore.xs \
64 Log.xs \
65 Network.xs \
66 Notify.xs \
67 Plugin.xs \
68 PluginPref.xs \
69 Pounce.xs \
70 Prefs.xs \
71 Privacy.xs \
72 Proxy.xs \
73 Prpl.xs \
74 Request.xs \
75 Roomlist.xs \
76 SSLConn.xs \
77 SavedStatuses.xs \
78 Signal.xs \
79 Server.xs \
80 Sound.xs \
81 Status.xs \
82 Stringref.xs \
83 Util.xs \
84 XMLNode.xs \
85
86 FALLBACKS = const-c.inc const-xs.inc
87
88 C_FILES = $(XS_FILES:%.xs=%.c)
89
90 OBJECTS = $(C_FILES:%.c=%.o)
91
92 ##
93 ## LIBRARIES
94 ##
95
96 LIBS = -lperl58 \
97 -lperl \
98 -lgaim \
99 -lglib-2.0
100
101 ##
102 ## RULES
103 ##
104
105 # How to make a C file
106 %.o: %.c
107 $(CC) $(CFLAGS) $(INCLUDE_PATHS) $(DEFINES) -c $< -o $@
108
109 # How to make a XS file
110 %.c: %.xs
111 $(PERL) $(EXTUTILS)/xsubpp -typemap $(EXTUTILS)/typemap -typemap typemap $< > $@
112
113 %.inc:
114 cp fallback/$@ ./
115
116 ##
117 ## TARGETS
118 ##
119
120 .PHONY: all clean
121
122 all: $(TARGET).dll $(AUTOSPLIT)
123
124 install:
125 rm -rf $(PERLMOD_INSTALL_DIR)
126 cp -R lib $(PERLMOD_INSTALL_DIR)
127 cp $(TARGET).dll $(PERLMOD_INSTALL_DIR)
128
129 $(AUTOSPLIT): Gaim.pm
130 mkdir -p ./lib/auto
131 cp Gaim.pm ./lib
132 $(PERL) -MAutoSplit -e 'autosplit("lib/Gaim.pm")'
133
134 $(TARGET).dll: $(FALLBACKS) $(OBJECTS)
135 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) -o $(TARGET).dll
136
137 ##
138 ## CLEAN
139 ##
140
141 clean:
142 rm -rf *.o $(TARGET).dll $(FALLBACKS) lib