-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
51 lines (38 loc) · 947 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
INCDIR = include
SRCDIR = src
OBJDIR = obj
CC = g++
CFLAGS = -I$(INCDIR) -Wall -g
LDFLAGS = -L/usr/lib/x86_64-linux-gnu
ifneq ($(zmqdir),)
CFLAGS += -I $(zmqdir)/include
LDFLAGS += -L $(zmqdir)/lib
endif
LIBS = -lzmq -lpthread
SRCS = $(wildcard ./$(SRCDIR)/*.cpp)
OBJS = $(SRCS:.cpp=.o)
OUTPUT = zmq_proxy
all: main
main: $(OBJS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT) $(OBJS) $(LIBS)
%.o: %.cpp
$(CC) $(CFLAGS) -c -o $@ $<
clean:
rm -f $(OUTPUT)
rm -f $(OBJS)
REMOTE = harbor.tangramflex.tech
PROJECT = tools
TAG = $(shell git log --format=%h -1)
# builds the docker image
# * requires docker
build_image:
docker build \
-t $(REMOTE)/$(PROJECT)/zmqproxy:latest \
-t $(REMOTE)/$(PROJECT)/zmqproxy:$(TAG) \
.
# pushes the docker image to harbor
# * requires docker
# * requires docker login to exist for harbor
push_image:
docker push $(REMOTE)/$(PROJECT)/zmqproxy:latest
docker push $(REMOTE)/$(PROJECT)/zmqproxy:$(TAG)