• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CXX ?= g++
2CPPFLAGS += -I../include -I./include -I../rmidevice
3CXXFLAGS += -Wall
4LDFLAGS += -L.
5LIBS =  -lrmidevice -lrt
6LIBDIR = ../rmidevice
7LIBNAME = librmidevice.a
8RMI4UPDATESRC = main.cpp firmware_image.cpp rmi4update.cpp updateutil.cpp
9RMI4UPDATEOBJ = $(RMI4UPDATESRC:.cpp=.o)
10PROGNAME = rmi4update
11STATIC_BUILD ?= y
12ifeq ($(STATIC_BUILD),y)
13LDFLAGS += -static
14endif
15
16all: $(PROGNAME)
17
18$(PROGNAME): $(RMI4UPDATEOBJ)
19	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(RMI4UPDATEOBJ) -L$(LIBDIR) $(LIBS) -o $(PROGNAME)
20
21clean:
22	rm -f $(RMI4UPDATEOBJ) $(PROGNAME)
23