Advertisement
Guest User

Untitled

a guest
Dec 30th, 2021
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. DESTDIR=
  2. CC=g++
  3. CFLAGS=-g -Wall -DNDEBUG -std=c++11
  4. LDFLAGS=
  5. SOURCES=main.cpp \
  6. Logger.cpp \
  7. Router.cpp \
  8. MMRDriver.cpp \
  9. RS232Driver.cpp \
  10. PowerRelayDriver.cpp \
  11. TCPServerDriver.cpp \
  12. TCPClientDriver.cpp \
  13. CatomClientDriver.cpp \
  14. TCPBufferedClientDriver.cpp \
  15. ConfigFileSettings.cpp \
  16. restclient-cpp/connection.cpp \
  17. restclient-cpp/helpers.cpp \
  18. restclient-cpp/restclient.cpp
  19.  
  20. OBJECTS=$(SOURCES:.cpp=.o)
  21. EXECUTABLE=aradrouterd
  22. PACKETREADER=packetreader
  23.  
  24. all: $(SOURCES) $(EXECUTABLE) $(PACKETREADER)
  25.  
  26. $(PACKETREADER): packetreader.c
  27. $(CC) $(LDFLAGS) $(CFLAGS) -pthread -o $@ packetreader.c
  28.  
  29. $(EXECUTABLE): $(OBJECTS)
  30. $(CC) $(LDFLAGS) $(OBJECTS) -pthread -o $@ -lcurl
  31.  
  32. .cpp.o:
  33. $(CC) -c $(CFLAGS) $< -o $@ -Irestclient-cpp
  34.  
  35. install: $(EXECUTABLE) $(PACKETREADER)
  36. install -D -m 0755 $(EXECUTABLE) $(DESTDIR)/usr/sbin/$(EXECUTABLE)
  37. install -D -m 0755 $(PACKETREADER) $(DESTDIR)/usr/sbin/$(PACKETREADER)
  38.  
  39. install -D -m 0644 aradrouterd.cfg $(DESTDIR)/etc/aradrouterd/aradrouterd.cfg
  40.  
  41. install -D -m 0644 aradrouterd.service $(DESTDIR)/lib/systemd/system/aradrouterd.service
  42.  
  43. clean:
  44. rm -f $(OBJECTS) $(EXECUTABLE) packetreader
  45.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement