# Makefile for bs, the Battleships game
-# Note: When the version changes, you also have to change the RPM spec file
VERSION=2.5
# Flags for use with the Linux ncurses package (recommended)
TERMLIB = -lncurses
CC = gcc
-# Flags for use with stock curses
-# TERMLIB = -lcurses
-# CC = gcc
-
bs: bs.c
$(CC) $(CFLAGS) -o bs bs.c $(TERMLIB)
RPMROOT=/usr/src/redhat
rpm: dist
- rpmbuild -ta bs-$(VERS).tar.gz
+ rpmbuild --define 'myversion $(VERS)' -ta bs-$(VERS).tar.gz
cp $(RPMROOT)/RPMS/*/bs-$(VERS)*.rpm .
cp $(RPMROOT)/SRPMS/bs-$(VERS)*.src.rpm .