]> git.cameronkatri.com Git - apple_cmds.git/blob - lib/libpcap/Makefile
Add .apple_version
[apple_cmds.git] / lib / libpcap / Makefile
1 Project = libpcap
2 ProjectVersion = 1.0.0
3 Patches = Makefile.in.diff configure.diff pcap-config.in.diff pcap-bpf.c.diff
4
5 include $(MAKEFILEPATH)/CoreOS/ReleaseControl/Common.make
6
7 # Extract the source.
8 install_source::
9 $(RMDIR) $(SRCROOT)/$(Project) $(SRCROOT)/$(Project)-$(ProjVersion)
10 $(TAR) -C $(SRCROOT) -xf $(SRCROOT)/$(Project)-$(ProjectVersion).tar.gz
11 $(MV) $(SRCROOT)/$(Project)-$(ProjectVersion) $(SRCROOT)/$(Project)
12 @set -x && \
13 cd $(SRCROOT)/$(Project) && \
14 for file in $(Patches); do \
15 patch -p0 -F0 -i $(SRCROOT)/patches/$$file; \
16 done
17
18 install_headers::
19 $(INSTALL_DIRECTORY) $(DSTROOT)/usr/include/pcap
20 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap-bpf.h $(DSTROOT)/usr/include
21 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap-namedb.h $(DSTROOT)/usr/include
22 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap.h $(DSTROOT)/usr/include
23 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap/bpf.h $(DSTROOT)/usr/include/pcap
24 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap/namedb.h $(DSTROOT)/usr/include/pcap
25 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap/pcap.h $(DSTROOT)/usr/include/pcap
26 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap/sll.h $(DSTROOT)/usr/include/pcap
27 $(INSTALL_FILE) $(SRCROOT)/$(Project)/pcap/usb.h $(DSTROOT)/usr/include/pcap
28
29 OSV = $(DSTROOT)/usr/local/OpenSourceVersions
30 OSL = $(DSTROOT)/usr/local/OpenSourceLicenses
31
32 install::
33 cd $(OBJROOT) && CFLAGS="$(CFLAGS)" $(SRCROOT)/$(Project)/configure --prefix=/usr --enable-ipv6
34
35 $(MAKE) -C $(OBJROOT)
36 $(CC) $(LDFLAGS) -dynamiclib -compatibility_version 1 -current_version 1 -all_load -install_name /usr/lib/libpcap.A.dylib -o $(OBJROOT)/libpcap.A.dylib $(OBJROOT)/libpcap.a
37
38 $(MAKE) -C $(OBJROOT) install DESTDIR=$(DSTROOT)
39 $(INSTALL_DYLIB) $(OBJROOT)/libpcap.A.dylib $(DSTROOT)/usr/lib
40 $(LN) -s libpcap.A.dylib $(DSTROOT)/usr/lib/libpcap.dylib
41
42 $(RM) $(DSTROOT)/usr/lib/libpcap.a
43
44 $(CP) $(DSTROOT)/usr/lib/libpcap.A.dylib $(SYMROOT)
45 $(STRIP) -S $(DSTROOT)/usr/lib/libpcap.A.dylib
46
47 $(MKDIR) $(OSV) $(OSL)
48 $(INSTALL_FILE) $(SRCROOT)/$(ProjectName).plist $(OSV)/$(ProjectName).plist
49 $(INSTALL_FILE) $(SRCROOT)/$(ProjectName)/LICENSE $(OSL)/$(ProjectName).txt
50
51 @$(MAKE) compress_man_pages