--- a
+++ b/modules/lms2012/d_pwm/Linuxmod_X86/buildmod
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Setup directories
+source ../../open_first/env_setup
+
+# Check for input filename
+if [ -z "$1" ]; then
+  echo usage: $0 modulename
+  exit
+fi  
+
+# Make module
+make -C $X86_KERNEL MOD=$1 M=`pwd`
+cp $1.ko $X86_MODULES/$1.ko
+
+rm *.o
+rm Module.symvers
+rm modules.order
+rm *.mod.c
+rm *.ko
+rm .*.*
+rm Module.markers
+rm -r .tmp_versions
+
+