Commit f7a31e9c authored by Valentin Dudouyt's avatar Valentin Dudouyt

install rule

parent 1899112d
.PHONY: all clean install test
COMMON_OBJECTS=byte_utils.o database.o minipro.o fuses.o easyconfig.o
OBJECTS=$(COMMON_OBJECTS) main.o minipro-query-db.o
PROGS=minipro minipro-query-db
......@@ -6,6 +7,10 @@ MINIPRO_QUERY_DB=minipro-query-db
TESTS=$(wildcard tests/test_*.c);
OBJCOPY=objcopy
BIN_DIR=$(DESTDIR)/usr/bin/
UDEV_RULES_DIR=$(DESTDIR)/etc/udev/rules.d/
MAN_DIR=$(DESTDIR)/usr/share/man/man1/
override CFLAGS += `pkg-config --cflags libusb-1.0` -g -O0
LIBS = `pkg-config --libs libusb-1.0`
......@@ -20,6 +25,15 @@ minipro-query-db: $(COMMON_OBJECTS) minipro-query-db.o
clean:
rm -f $(OBJECTS) $(PROGS)
install:
mkdir -p $(BIN_DIR)
mkdir -p $(UDEV_RULES_DIR)
mkdir -p $(MAN_DIR)
cp $(MINIPRO) $(BIN_DIR)
cp $(MINIPRO_QUERY_DB) $(BIN_DIR)
cp udev/rules.d/80-minipro.rules $(UDEV_RULES_DIR)
cp man/minipro.1 $(MAN_DIR)
test: $(TESTS:.c=.stamp)
$(CC) -c -I. $< $(CFLAGS) -DTEST -o $(<:.c=.o)
$(OBJCOPY) --weaken $(<:.c=.o)
......
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