2008-10-10 00:05:40 +02:00
|
|
|
CC?=gcc
|
|
|
|
CFLAGS?=
|
|
|
|
|
|
|
|
CFLAGS_DEBUG=
|
2008-02-07 01:58:41 +01:00
|
|
|
|
2008-11-02 15:18:16 +01:00
|
|
|
SONAME=libtermkey.so.0
|
|
|
|
|
2008-10-07 00:24:54 +02:00
|
|
|
ifeq ($(DEBUG),1)
|
2008-10-10 00:05:40 +02:00
|
|
|
CFLAGS_DEBUG=-ggdb -DDEBUG
|
2008-10-07 00:24:54 +02:00
|
|
|
endif
|
|
|
|
|
2008-02-07 01:58:41 +01:00
|
|
|
all: demo
|
|
|
|
|
2008-11-02 15:18:16 +01:00
|
|
|
demo: libtermkey.so demo.c
|
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -o $@ $^
|
|
|
|
|
|
|
|
libtermkey.so: termkey.o driver-csi.o driver-ti.o
|
|
|
|
$(LD) -shared -soname=$(SONAME) -o $@ $^ -lncurses
|
2008-02-07 01:58:41 +01:00
|
|
|
|
2008-10-07 00:27:19 +02:00
|
|
|
%.o: %.c
|
2008-10-10 00:05:40 +02:00
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_DEBUG) -Wall -std=c99 -o $@ -c $^
|
2008-02-07 01:58:41 +01:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
|
|
rm -f *.o demo
|