Abstract out ld flags in Makefile
This commit is contained in:
parent
d8f6551972
commit
7d623be041
3
Makefile
3
Makefile
|
@ -1,6 +1,7 @@
|
||||||
LIBTOOL=libtool
|
LIBTOOL=libtool
|
||||||
|
|
||||||
CFLAGS?=
|
CFLAGS?=
|
||||||
|
LDFLAGS=-lcurses
|
||||||
|
|
||||||
CFLAGS_DEBUG=
|
CFLAGS_DEBUG=
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ LIBRARY=libtermkey.la
|
||||||
$(LIBTOOL) --mode=compile --tag=CC gcc $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -o $@ -c $<
|
$(LIBTOOL) --mode=compile --tag=CC gcc $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -o $@ -c $<
|
||||||
|
|
||||||
$(LIBRARY): $(OBJECTS)
|
$(LIBRARY): $(OBJECTS)
|
||||||
$(LIBTOOL) --mode=link --tag=CC gcc -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) -lcurses -o $@ $^
|
$(LIBTOOL) --mode=link --tag=CC gcc -rpath $(LIBDIR) -version-info $(VERSION_CURRENT):$(VERSION_REVISION):$(VERSION_AGE) $(LDFLAGS) -o $@ $^
|
||||||
|
|
||||||
demo: $(LIBRARY) demo.lo
|
demo: $(LIBRARY) demo.lo
|
||||||
$(LIBTOOL) --mode=link --tag=CC gcc -o $@ $^
|
$(LIBTOOL) --mode=link --tag=CC gcc -o $@ $^
|
||||||
|
|
Loading…
Reference in New Issue