summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick <Patrick.Murphy@multitech.com>2020-03-31 11:35:07 -0500
committerPatrick <Patrick.Murphy@multitech.com>2020-03-31 11:35:07 -0500
commit78178d911f0ede1776390b360af2ee0235e4fa53 (patch)
tree6a45e195c1bfe0a3d0a05ffe18387f4d1380077f
parent5b441749fb3525c54453b9fe8a0c2e5bb37cf53a (diff)
downloadcommissioning-78178d911f0ede1776390b360af2ee0235e4fa53.tar.gz
commissioning-78178d911f0ede1776390b360af2ee0235e4fa53.tar.bz2
commissioning-78178d911f0ede1776390b360af2ee0235e4fa53.zip
addressing error in gitlab file grab
-rw-r--r--src/Makefile26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/Makefile b/src/Makefile
index 94e823d..a13fd64 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -3,17 +3,25 @@ ARCH=$(shell uname -m)
CC := g++
SRCDIR := .
BUILDDIR := $(ARCH)
-DEPLOYDIR := .
-# DEPLOYDIR := deploy
-# TARGET := $(DEPLOYDIR)/commissioning_$(ARCH).fcgi
+DEPLOYDIR := deploy
+# TARGET := $(DEPLOYDIR)/fcgi_commission_$(ARCH).fcgi
+SRCEXT := cpp
+SOURCES := $(shell find $(SRCDIR) -type f -name *.$(SRCEXT))
+OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.o))
CCFLAGS := -std=c++11 -g -Wall -Werror -pedantic -pedantic-errors
-LIB := -ljsoncpp -lfcgi++ -lfcgi
-INC := -I ../include
+LIB := -ljsoncpp -lfcgi++ -lfcgi -lcurl
+INC := -I
-fcgi_commission.fcgi: fcgi_commission.o
- $(CC) -o fcgi_commission.fcgi fcgi_commission.o
+S = "${WORKDIR}/git
-clean:
- @echo " $(RM) fcgi_commission.fcgi
+install:
+ mkdir -p $(DESTDIR)/sbin
+ cp fcgi_commission $(DESTDIR)/sbin
+
+fcgi_commission: $(OBJECTS)
+ $(CC) $(CCFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) /usr/sbin $(LIB)
+
+%.o: %.CC
+ $(CC) $(CCFLAGS) -c