add libnl
[build.git] / planetlab.mk
index 83cdf3c..215021e 100644 (file)
@@ -4,7 +4,7 @@
 # Mark Huang <mlhuang@cs.princeton.edu>
 # Copyright (C) 2003-2006 The Trustees of Princeton University
 #
-# $Id: planetlab.mk,v 1.49 2007/02/08 15:18:08 mlhuang Exp $
+# $Id: planetlab.mk,v 1.61 2007/07/24 15:20:36 mef Exp $
 #
 
 #
@@ -49,34 +49,21 @@ endif
 # kernel
 #
 
-kernel-x86_64-MODULE := linux-2.6
-kernel-x86_64-RPMFLAGS:= --target x86_64
-kernel-x86_64-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
-#ALL += kernel-x86_64
+# Figure out whether we are building on i386 or x86_64 host
+HOSTARCH := $(shell uname -i)
 
-kernel-i686-MODULE := linux-2.6
-kernel-i686-RPMFLAGS:= --target i686
-kernel-i686-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
-ALL += kernel-i686
-
-kernel-i586-MODULE := linux-2.6
-kernel-i586-RPMFLAGS:= --target i586
-kernel-i586-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
-ALL += kernel-i586
-
-kernel: kernel-i586 kernel-i686
-kernel-clean: kernel-i586-clean kernel-i686-clean
-
-#
-# vnet
-#
+kernel-$(HOSTARCH)-MODULE := linux-2.6
+kernel-$(HOSTARCH)-SPEC := linux-2.6/scripts/kernel-2.6-planetlab.spec
+ifeq ($(HOSTARCH),i386)
+kernel-$(HOSTARCH)-RPMFLAGS:= --target i686
+else
+kernel-$(HOSTARCH)-RPMFLAGS:= --target $(HOSTARCH)
+endif
 
-vnet-MODULE := vnet
-vnet-SPEC := vnet/vnet.spec
-ALL += vnet
+ALL += kernel-$(HOSTARCH)
 
-# Build kernel first so we can bootstrap off of its build
-vnet: kernel
+kernel-clean: kernel-$(HOSTARCH)-clean
+kernel: kernel-$(HOSTARCH)
 
 #
 # madwifi
@@ -84,7 +71,7 @@ vnet: kernel
 
 madwifi-ng-MODULE := madwifi-ng
 madwifi-ng-SPEC := madwifi-ng/madwifi.spec
-ALL += madwifi-ng
+#ALL += madwifi-ng
 
 # Build kernel first so we can bootstrap off of its build
 madwifi-ng: kernel
@@ -93,8 +80,8 @@ madwifi-ng: kernel
 # ivtv 
 #
 
-#ivtv-MODULE := ivtv
-#ivtv-SPEC := ivtv/ivtv.spec
+ivtv-MODULE := ivtv
+ivtv-SPEC := ivtv/ivtv.spec
 #ALL += ivtv
 
 #
@@ -204,6 +191,14 @@ ALL += proper
 
 proper: libhttpd++
 
+#
+# CoDemux: Port 80 demux
+#
+
+codemux-MODULE := codemux
+codemux-SPEC   := codemux/codemux.spec
+#ALL += codemux
+
 #
 # MySQL
 #
@@ -353,6 +348,14 @@ myplc-devel-SPEC := myplc/myplc-devel.spec
 myplc-devel-RPMBUILD := sudo rpmbuild
 ALL += myplc-devel
 
+#
+# libnl
+#
+
+libnl-MODULE := libnl
+libnl-SPEC := libnl/libnl.spec
+ALL += libnl
+
 #
 # Installation rules
 # 
@@ -369,7 +372,7 @@ REPOS := /plc/data/var/www/html/install-rpms/planetlab-alpha
 endif
 
 RPMS/yumgroups.xml:
-       install -D -m 644 groups/v3_yumgroups.xml RPMS/yumgroups.xml
+       install -D -m 644 groups/v4_yumgroups.xml RPMS/yumgroups.xml
 
 install:
 ifeq ($(BASE),)
@@ -405,15 +408,16 @@ endif
        --exclude '*-debuginfo-*' \
        --recursive --links --perms --times --group --compress --rsh=ssh \
        RPMS/ $(SERVERB):$(ARCHIVE)/$(BASE)
-
 ifeq ($(TAG),HEAD)
         # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
        if ! ssh $(SERVERA) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
            ssh $(SERVERA) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \
        fi
+        # Update nightly alpha symlink if it does not exist or is broken, or it is Monday
        if ! ssh $(SERVERB) "[ -e $(REPOS) ] && exit 0 || exit 1" || [ "$(shell date +%A)" = "Monday" ] ; then \
            ssh $(SERVERB) ln -nsf $(ARCHIVE)/$(BASE) $(REPOS) ; \
        fi
+
 endif
 endif