diff --git a/sm5/Makefile b/sm5/Makefile
index e5af978c04811850541ba48bec4d2f86554e7cc5..a3496d744df84a0e0c08769b79107fd206dc5a59 100644
--- a/sm5/Makefile
+++ b/sm5/Makefile
@@ -1,6 +1,6 @@
 # Makefile for smartmontools
 #
-# $Id: Makefile,v 1.11 2002/10/11 12:19:00 ballen4705 Exp $
+# $Id: Makefile,v 1.12 2002/10/11 12:48:27 ballen4705 Exp $
 #
 # Copyright (C) 2002 Bruce Allen <smartmontools-support@lists.sourceforge.net>
 # 
@@ -28,11 +28,11 @@ pkgname2=$(pkgname)-$(counter)
 
 all: smartd smartctl
 
-smartctl: atacmds.o scsicmds.o smartctl.c smartctl.h ataprint.o scsiprint.o atacmds.h ataprint.h scsicmds.h scsiprint.h
-	${CC} -o smartctl ${CFLAGS} atacmds.o scsicmds.o ataprint.o smartctl.c scsiprint.o
+smartctl: atacmds.o scsicmds.o smartctl.c smartctl.h ataprint.o scsiprint.o atacmds.h ataprint.h scsicmds.h scsiprint.h VERSION
+	${CC} -DSMARTMONTOOLS_VERSION=$(counter) -o smartctl ${CFLAGS} atacmds.o scsicmds.o ataprint.o smartctl.c scsiprint.o
 
-smartd:  atacmds.o scsicmds.o smartd.c smartd.h atacmds.h scsicmds.h
-	${CC} -o smartd ${CFLAGS} scsicmds.o atacmds.o smartd.c
+smartd:  atacmds.o scsicmds.o smartd.c smartd.h atacmds.h scsicmds.h VERSION
+	${CC} -DSMARTMONTOOLS_VERSION=$(counter) -o smartd ${CFLAGS} scsicmds.o atacmds.o smartd.c
 
 ataprint.o: atacmds.o ataprint.h ataprint.c smartctl.h extern.h
 	${CC} ${CFLAGS} -c ataprint.c
@@ -46,12 +46,6 @@ atacmds.o: atacmds.h atacmds.c
 scsicmds.o: scsicmds.h scsicmds.c 
 	${CC} ${CFLAGS} -c scsicmds.c
 
-atacmds.h: VERSION
-	cat atacmds.h | sed '/SMARTMONTOOLS_VERSION/d' > temp.atacmds.h
-	echo "#define SMARTMONTOOLS_VERSION " $(counter) > temp.head
-	cat temp.head temp.atacmds.h > atacmds.h
-	rm -f temp.atacmds.h temp.head
-
 clean:
 	rm -f *.o smartctl smartd *~ \#*\# smartmontools*.tar.gz smartmontools*.rpm temp.*
 
diff --git a/sm5/VERSION b/sm5/VERSION
index 0cfbf08886fca9a91cb753ec8734c84fcbe52c9f..00750edc07d6415dcc07ae0351e9397b0222b7ba 100644
--- a/sm5/VERSION
+++ b/sm5/VERSION
@@ -1 +1 @@
-2
+3
diff --git a/sm5/atacmds.h b/sm5/atacmds.h
index add7f1dcdaa588856a39cd587d82a46935d27632..3ca21074b867bf7ee5088420aad0b23c475dc2dd 100644
--- a/sm5/atacmds.h
+++ b/sm5/atacmds.h
@@ -1,5 +1,4 @@
-#define SMARTMONTOOLS_VERSION  1
-//  $Id: atacmds.h,v 1.7 2002/10/11 12:21:09 ballen4705 Exp $
+//  $Id: atacmds.h,v 1.8 2002/10/11 12:48:27 ballen4705 Exp $
 /*
  * atacmds.h
  *
diff --git a/sm5/smartmontools.spec b/sm5/smartmontools.spec
index 9d721f2096e72da1436195f464a980693f096ef9..52aa6312fb4222ace21764f4a50e677749074ef1 100644
--- a/sm5/smartmontools.spec
+++ b/sm5/smartmontools.spec
@@ -1,4 +1,4 @@
-Release:  1
+Release:  2
 Summary:	SMARTmontools - for monitoring S.M.A.R.T. disks and devices
 Name:		smartmontools
 Version:	5.0