summaryrefslogtreecommitdiffstats
path: root/host/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'host/Makefile')
-rw-r--r--host/Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/host/Makefile b/host/Makefile
index 667d094..317bc59 100644
--- a/host/Makefile
+++ b/host/Makefile
@@ -1,17 +1,24 @@
INCLUDES=$(shell pkg-config --cflags libusb-1.0)
-LIBS=$(shell pkg-config --libs libusb-1.0)
+LIBS=-Bstatic $(shell pkg-config --libs libusb-1.0) -lpthread -Bdynamic -ludev
-PROG=cryptopad
-CSRCS=main.c hexdump.c
+LDFLAGS=-s
+PROGS=main set get
+LIBSRCS=hexdump.c
-OBJS=${CSRCS:%.c=%.o}
+LIBOBJS=${LIBSRCS:%.c=%.o}
CFLAGS=${OPT}
CPPFLAGS=${INCLUDES} ${DEFINES}
-${PROG}:${OBJS}
- ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}
+default:${PROGS}
+
+
+${PROGS}: %:%.o ${LIBOBJS}
+ ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ $@.o ${OBJS} ${LIBS}
+
+#${PROG}:${OBJS}
+# ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJS} ${LIBS}
clean:
- /bin/rm -f *~ *.d ${PROG} ${OBJS}
+ /bin/rm -f *~ *.d ${PROGS} ${OBJS}