Lines 3-9
Link Here
|
3 |
#Tom St Denis |
3 |
#Tom St Denis |
4 |
VERSION=0:41 |
4 |
VERSION=0:41 |
5 |
|
5 |
|
6 |
CC = libtool --mode=compile --tag=CC gcc |
6 |
LT ?= libtool |
|
|
7 |
LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC) |
7 |
|
8 |
|
8 |
CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare |
9 |
CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare |
9 |
|
10 |
|
Lines 82-102
Link Here
|
82 |
|
83 |
|
83 |
objs: $(OBJECTS) |
84 |
objs: $(OBJECTS) |
84 |
|
85 |
|
|
|
86 |
.c.o: |
87 |
$(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $< |
88 |
|
85 |
$(LIBNAME): $(OBJECTS) |
89 |
$(LIBNAME): $(OBJECTS) |
86 |
libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) |
90 |
$(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION) |
87 |
|
91 |
|
88 |
install: $(LIBNAME) |
92 |
install: $(LIBNAME) |
89 |
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) |
93 |
install -d $(DESTDIR)$(LIBPATH) |
90 |
libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) |
94 |
$(LT) --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME) |
91 |
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) |
95 |
install -d $(DESTDIR)$(INCPATH) |
92 |
install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) |
96 |
install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH) |
93 |
|
97 |
|
94 |
test: $(LIBNAME) demo/demo.o |
98 |
test: $(LIBNAME) demo/demo.o |
95 |
gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o |
99 |
$(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o |
96 |
libtool --mode=link gcc -o test demo/demo.o $(LIBNAME_S) |
100 |
$(LT) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S) |
97 |
|
101 |
|
98 |
mtest: test |
102 |
mtest: test |
99 |
cd mtest ; gcc $(CFLAGS) mtest.c -o mtest |
103 |
cd mtest ; $(CC) $(CFLAGS) $(LDFLAGS) mtest.c -o mtest |
100 |
|
104 |
|
101 |
timing: $(LIBNAME) |
105 |
timing: $(LIBNAME) |
102 |
gcc $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest |
106 |
$(LT) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest |