Skip to content

Commit

Permalink
Update Makefile and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jclehner committed Oct 1, 2024
1 parent c5f26b8 commit 0b755d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y build-essential pkg-config git zip wget file
RUN apt-get install -y g++-mingw-w64-i686
RUN apt-get install -y imagemagick
RUN apt-get install -y libpcap-dev libnl-3-dev libnl-route-3-dev

RUN mkdir -p /usr/src
Expand Down
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ LINUXDEPLOY = ./linuxdeploy-$(ARCH).AppImage
TMP := $(shell mktemp -d)
APPDIR = $(TMP)/AppDir
AFL = afl-gcc
DOCKER_BUILD_NAME=nmrpflash
DOCKER_CONTAINER_NAME=$(DOCKER_BUILD_NAME)-container

nmrpflash_OBJ = nmrp.o tftp.o ethsock.o main.o util.o

Expand Down Expand Up @@ -116,8 +118,9 @@ nmrpflash.ico: nmrpflash.svg
convert -background transparent -define icon:auto-resize=256,64,48,32,16 $< $@

build-release-with-docker:
docker build --build-arg CACHEBUST=$(shell date +%s) --build-arg NPCAP_SDK=$(NPCAP_SDK) --progress=plain -t nmrpflash .
docker create --name dummy nmrpflash
docker cp dummy:/usr/src/nmrpflash/nmrpflash-$(VERSION)-linux-$(ARCH).zip .
docker cp dummy:/usr/src/nmrpflash/nmrpflash-$(VERSION)-win32.zip .
docker rm -f dummy
docker build --build-arg CACHEBUST=$(shell date +%s) --build-arg NPCAP_SDK=$(NPCAP_SDK) --progress=plain -t $(DOCKER_BUILD_NAME) .
-docker rm $(DOCKER_CONTAINER_NAME) &> /dev/null
docker create --name $(DOCKER_CONTAINER_NAME) nmrpflash
docker cp $(DOCKER_CONTAINER_NAME):/usr/src/nmrpflash/nmrpflash-$(VERSION)-linux-$(ARCH).zip .
docker cp $(DOCKER_CONTAINER_NAME):/usr/src/nmrpflash/nmrpflash-$(VERSION)-win32.zip .
docker rm $(DOCKER_CONTAINER_NAME)

0 comments on commit 0b755d4

Please sign in to comment.