Home | History | Annotate | Download | only in libevent
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     22 # Use is subject to license terms.
     23 #
     24 #ident	"@(#)Makefile.sfw	1.3	08/05/15 SMI"
     25 
     26 VER=libevent-1.3e
     27 VER64=$(VER)-64
     28 
     29 include ../Makefile.lib
     30 
     31 # lint 
     32 LIBRARY=libevent.a
     33 LINTOUT=        lint.out
     34 LINTFLAGS = -nsvx -I./include
     35 LINTFLAGS64 = -nsvx -Xarch=$(MACH64:sparcv9=v9) -I./include
     36 
     37 CFLAGS +=	-mt
     38 CFLAGS64 +=	-mt
     39 LDFLAGS=	-lnsl -lresolv
     40 
     41 all : real-all
     42 
     43 all32: $(VER)/config.status
     44 	(cd $(VER); env \
     45 	    CC=$(CC) "CFLAGS=$(CFLAGS)" \
     46 	    PATH=$(SFW_PATH) \
     47 	    "MAKE=$(CCSMAKE)" \
     48 	    $(CCSMAKE))
     49 
     50 all64: $(VER64)/config.status
     51 	(cd $(VER64); env \
     52 	    CC=$(CC64) "CFLAGS=$(CFLAGS64)" \
     53 	    PATH=$(SFW_PATH) \
     54 	    "MAKE=$(CCSMAKE)" \
     55 	    $(CCSMAKE))
     56 
     57 install: all
     58 	$(SH) ./install-sfw
     59 	MACH64=$(MACH64) $(SH) ./install-sfw-64
     60 	
     61 real-all: all32 lint32 all64 lint64
     62 
     63 $(VER)/config.status: $(VER)/configure
     64 	(cd $(VER); env \
     65 	    "CC=$(CC)" "CFLAGS=-$(CFLAGS)" \
     66 	    "LDFLAGS =$(LDFLAGS)" \
     67 	    PATH=$(SFW_PATH) \
     68 	    "MAKE=$(CCSMAKE)" \
     69 	    ./configure --prefix=/usr  --enable-threads )
     70 	patch -N $(VER)/evport.c < evport.patch
     71 	patch -N $(VER)/http.c < http.patch
     72 	patch -N $(VER)/event.3 < event.3.patch
     73 
     74 $(VER64)/config.status: $(VER64)/configure
     75 	(cd $(VER64); env \
     76 	    "CC=$(CC64)" "CFLAGS=$(CFLAGS64)" \
     77 	    "LDFLAGS = $LDFLAGS)" \
     78 	    PATH=$(SFW_PATH) \
     79 	    "MAKE=$(CCSMAKE)" \
     80 	    ./configure --prefix=/usr --enable-threads)
     81 	patch -N $(VER64)/evport.c < evport.patch
     82 	patch -N $(VER64)/http.c < http.patch
     83 
     84 
     85 $(VER)/configure: $(VER).tar.gz
     86 	gzip -dc $(VER).tar.gz | tar xopf -
     87 	patch -N $(VER)/Makefile.in < Makefile.in.patch
     88 	patch -N $(VER)/configure < config.patch
     89 	touch $(VER)/configure
     90 
     91 $(VER64)/configure: $(VER).tar.gz
     92 	mkdir -p tmp
     93 	gzip -dc $(VER).tar.gz | (cd tmp; tar xopf -)
     94 	rm -rf $(VER64)
     95 	mv tmp/$(VER) $(VER64); rmdir tmp
     96 	patch -N $(VER64)/Makefile.in < Makefile.in.patch
     97 	patch -N $(VER64)/configure < config.patch
     98 	touch $(VER64)/configure
     99 clean:
    100 	-rm -rf $(VER)
    101 	-rm -rf $(VER64)
    102 
    103 lint32: $(VER)/config.status
    104 	(cd $(VER); \
    105 	    $(LINT.c) -o $(LIBNAME) ../llib-levent > $(LINTOUT) 2>&1)
    106 
    107 lint64: $(VER64)/config.status
    108 	(cd $(VER64); \
    109 	    $(LINT64.c) -o $(LIBNAME) ../llib-levent > $(LINTOUT) 2>&1)
    110 install_h:
    111 
    112 include ../Makefile.targ
    113