Makefile 554 Bytes
BIN_DIR = data/bin
DOCROOT_DIR = data/document-root
LIB_DIR = data/lib64

LIBS =
#LIBS = $(LIB_DIR)/ld-linux-x86-64.so.2 \
#       $(LIB_DIR)/libc.so.6 \
#       $(LIB_DIR)/libpthread.so.0

EXE = $(BIN_DIR)/$(APP_NAME)

.PHONY: all clean react

all: $(LIBS) $(EXE) react Dockerfile
	docker build -t $(DOCKER_IMAGE_TAG) .

$(LIBS):
	install -D /lib64/$(notdir $@) $@
	strip $@

$(EXE):
	install -D $(GOEXE) $@

react:
	install -d ${DOCROOT_DIR}
	rsync -vaurl --delete ../react/build/ ${DOCROOT_DIR}

clean:
	docker rmi -f $(DOCKER_IMAGE_TAG)
	rm -Rf data