aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1c31330..d6cec73 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
PACKAGE = monitor-edid
-VERSION = 1.10
+VERSION = $(shell rpm -q --qf "%{VERSION}\n" --specfile $(PACKAGE).spec | head -n 1)
FILES = $(shell ls | grep -v CVS | grep -vF .tar)
ARCH := $(patsubst i%86,i386,$(shell uname -m))
@@ -18,7 +18,8 @@ endif
TARGETS = monitor-get-edid-using-vbe cvt
-CFLAGS = -O -Wall -g -I.
+CPPFLAGS = -I.
+CFLAGS = -O -Wall -g
OBJS = monitor-get-edid-using-vbe.c vbe.o libint10.a libx86emu.a
ifeq (i386,$(ARCH))
@@ -43,6 +44,9 @@ clean:
$(RM) $(TARGETS) *.a *.o *~
rm -rf $(PACKAGE)-$(VERSION) $(PACKAGE)-$(VERSION).tar.bz2
+%.o: %.c
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
+
# rules to build a test rpm