blob: a1be1f978a4f23a5959bbe2ff34641ea7ca868f8 [file] [log] [blame]
jat@google.com687ee972010-03-15 12:52:23 +00001#
2# Copyright 2010 Google Inc.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may not
5# use this file except in compliance with the License. You may obtain a copy of
6# the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations under
14# the License.
15
16# Modify to point to your Wireshark and glib include directories
17INCS = -I/usr/include/wireshark -I/usr/include/glib-2.0 \
18 -I/usr/lib/glib-2.0/include -I../common
19
20CC = gcc
21
22SRCS = packet-gwtcs.c
23OBJS = obj/packet-gwtcs.o
24
25PLUGIN_NAME = packet-gwtcs
26PLUGIN_DIR = $(HOME)/.wireshark/plugins
27PLUGIN = $(PLUGIN_NAME).so
28
29CFLAGS = -DHAVE_CONFIG_H $(INCS) -DINET6 -D_U_=__attribute__\(\(unused\)\) \
30 -Wall -Wpointer-arith -g -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API \
31 -fPIC -DPIC -O2
32
33all:: obj/$(PLUGIN)
34
35install:: obj/$(PLUGIN)
36 cp obj/$(PLUGIN) $(PLUGIN_DIR)/$(PLUGIN)
37
38obj/$(PLUGIN) : $(OBJS)
39 mkdir -p $(PLUGIN_DIR)
40 $(CC) -shared $(OBJS) -o $@
41
42$(OBJS): obj
43
44obj:
45 mkdir obj
46
47obj/packet-gwtcs.o : packet-gwtcs.c ../common/BrowserChannel.h
48 $(CC) -c $(CFLAGS) $< -o $@
49
50clean:
51 rm -rf obj