aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-08-26 09:23:54 +0200
committerHarald Welte <laforge@gnumonks.org>2018-08-26 10:09:43 +0200
commitf7f61cd10f6c7d02c65c710050303f4eed500d28 (patch)
tree0ed955d7e27876de27db79fa21fdcb1bdc23a02c
parent0e95f53588af7fbd2cdad21e3682cdfc3fd0dceb (diff)
Makefiles: Add "make install" target
-rw-r--r--firmware/Makefile4
-rw-r--r--host/Makefile10
2 files changed, 12 insertions, 2 deletions
diff --git a/firmware/Makefile b/firmware/Makefile
index ca22bdd..c9039a3 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -234,3 +234,7 @@ log:
clean:
-rm -fR $(OBJ)/*.o $(BIN)/*.bin $(BIN)/*.elf $(BIN)/*.elf.txt $(BIN)/*.map $(BIN)/*.lst `find . -name \*.p`
+
+install:
+ mkdir -p $(DESTDIR)/usr/share/simtrace2
+ cp $(BIN)/*.bin $(BIN)/*.elf $(BIN)/*.elf.txt $(BIN)/*.map $(DESTDIR)/usr/share/simtrace2
diff --git a/host/Makefile b/host/Makefile
index 02f2a8f..7d5c7a4 100644
--- a/host/Makefile
+++ b/host/Makefile
@@ -1,7 +1,9 @@
LDFLAGS=`pkg-config --libs libusb-1.0 libosmocore` -losmocore
CFLAGS=-Wall -g
-all: simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff
+APPS=simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff
+
+all: $(APPS)
simtrace2-remsim: simtrace2-remsim.o apdu_dispatch.o simtrace2-discovery.o libusb_util.o
$(CC) -o $@ $^ $(LDFLAGS) -losmosim
@@ -19,4 +21,8 @@ simtrace2-sniff: simtrace2-sniff.o simtrace2-discovery.o libusb_util.o
$(CC) $(CFLAGS) `pkg-config --cflags libusb-1.0 libosmocore` -o $@ -c $^
clean:
- @rm -f simtrace2-remsim simtrace2-remsim-usb2udp simtrace2-list simtrace2-sniff *.o
+ @rm -f *.o $(APPS)
+
+install: $(APPS)
+ mkdir -p $(DESTDIR)/usr/bin
+ cp $(APPS) $(DESTDIR)/usr/bin/