jat@google.com | 687ee97 | 2010-03-15 12:52:23 +0000 | [diff] [blame] | 1 | # |
| 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 |
| 17 | INCS = -I/usr/include/wireshark -I/usr/include/glib-2.0 \ |
| 18 | -I/usr/lib/glib-2.0/include -I../common |
| 19 | |
| 20 | CC = gcc |
| 21 | |
| 22 | SRCS = packet-gwtcs.c |
| 23 | OBJS = obj/packet-gwtcs.o |
| 24 | |
| 25 | PLUGIN_NAME = packet-gwtcs |
| 26 | PLUGIN_DIR = $(HOME)/.wireshark/plugins |
| 27 | PLUGIN = $(PLUGIN_NAME).so |
| 28 | |
| 29 | CFLAGS = -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 | |
| 33 | all:: obj/$(PLUGIN) |
| 34 | |
| 35 | install:: obj/$(PLUGIN) |
| 36 | cp obj/$(PLUGIN) $(PLUGIN_DIR)/$(PLUGIN) |
| 37 | |
| 38 | obj/$(PLUGIN) : $(OBJS) |
| 39 | mkdir -p $(PLUGIN_DIR) |
| 40 | $(CC) -shared $(OBJS) -o $@ |
| 41 | |
| 42 | $(OBJS): obj |
| 43 | |
| 44 | obj: |
| 45 | mkdir obj |
| 46 | |
| 47 | obj/packet-gwtcs.o : packet-gwtcs.c ../common/BrowserChannel.h |
| 48 | $(CC) -c $(CFLAGS) $< -o $@ |
| 49 | |
| 50 | clean: |
| 51 | rm -rf obj |