Commit 14326f81 authored by Federico Vaga's avatar Federico Vaga

Fix and imporve library tools

parents 5f7652ca 7a173aed
DESTDIR ?= /usr/local
LIBADC = ../lib/
ZIO ?= ../zio
......@@ -8,13 +10,21 @@ DEMOS := fald-simple-acq fald-acq fald-trg-cfg
DEMOS += fald-simple-get-conf
DEMOS += fald-test
all: demo
demo: $(DEMOS)
install:
install -d $(DESTDIR)/bin
install -D $(DEMOS) $(DESTDIR)/bin
%: %.c $(LIBADC)/libfmcadc.a
$(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS)
# make nothing for modules_install, but avoid errors
modules_install:
clean:
rm -f $(DEMOS) *.o *~
......
This diff is collapsed.
......@@ -26,8 +26,12 @@ int main()
/* get user input */
for (;;) {
memset(msg, 0, 512);
fprintf(stdout, "Change trig config using standard args: -a -b -c -n \n >>>: ");
fprintf(stdout, "Change trig config using standard args: -a -b -c -n -e\n >>>: ");
ptr = fgets(msg, sizeof(msg), stdin);
if (!ptr) {
fprintf(stderr, "Error while reading options\n");
break;
}
/* removing newline at the end */
if (msg[strlen(msg)-1] == '\n')
msg[strlen(msg)-1] = '\0';
......
# user-space tools for spec-fine-delay
M = $(shell /bin/pwd)/../kernel
DESTDIR ?= /usr/local
HOST_EXTRACFLAGS += -I$(M) -I$(ZIO)/include -Wno-trigraphs -Wall -ggdb
......@@ -14,8 +16,12 @@ all modules: $(hostprogs-y)
clean:
rm -f $(hostprogs-y) *.o *~
# make nothing for module_install, but avoid errors
module_install:
# make nothing for modules_install, but avoid errors
modules_install:
install:
install -d $(DESTDIR)/bin
install -D $(hostprogs-y) $(DESTDIR)/bin
# we need this as we are out of the kernel
%: %.c
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment