diff options
author | David Teigland <teigland@redhat.com> | 2009-06-01 16:41:43 -0500 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2009-06-01 16:41:43 -0500 |
commit | e2abfa0ae1114805592853549ab812731e939910 (patch) | |
tree | 1f9d640f3a05727d288ffdd97b13962ac64e0248 /cpgx/Makefile | |
parent | 21fc9c73dbeaff75cb4a9b629b6da4aade9a653c (diff) | |
download | dct-stuff-e2abfa0ae1114805592853549ab812731e939910.tar.gz dct-stuff-e2abfa0ae1114805592853549ab812731e939910.tar.xz dct-stuff-e2abfa0ae1114805592853549ab812731e939910.zip |
cpgx: new makefile
deal with lib64 and whitetank differences
fix some warnings from -Wall
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'cpgx/Makefile')
-rw-r--r-- | cpgx/Makefile | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/cpgx/Makefile b/cpgx/Makefile index 54e3860..031e842 100644 --- a/cpgx/Makefile +++ b/cpgx/Makefile @@ -1,4 +1,29 @@ -cpgx: cpgx.c - gcc -L/usr/lib64 cpgx.c -g -o cpgx -lcpg +ARCHM=$(shell uname -m) + +CFLAGS := -Wall -g + +ifdef WHITETANK +CFLAGS += -DWHITETANK +ifeq (x86_64,$(ARCHM)) +LDFLAGS += -L/usr/lib64/openais +else +LDFLAGS := -L/usr/lib/openais +endif +endif + +all: cpgx + +cpgx: cpgx.o + gcc $(LDFLAGS) -o $@ $^ -lcpg + +cpgx.o: cpgx.c + gcc $(CFLAGS) -c -o $@ $< + +clean: + rm -f *.o cpgx + +install: all + install cpgx /usr/bin + |