-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added option to compile for single or multi service mode
- Loading branch information
1 parent
cd70782
commit a7a7ebb
Showing
4 changed files
with
91 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
CXX = g++ | ||
CXXFLAGS = -O3 -std=c++11 -Wextra | ||
LDFLAGS = -lcrypto | ||
LIBS = -lcrypto | ||
LDFLAGS = -lcrypto -lcurl -ljsoncpp | ||
LIBS = -lcrypto -lcurl -ljsoncpp | ||
INCS = -I./include | ||
PROG = get_flag | ||
SRCS = $(wildcard *.cpp) | ||
OBJS = $(patsubst %.cpp, %.o, $(SRCS)) | ||
SUBDIRS = all clean | ||
SUBDIRS = single multi clean | ||
|
||
all: $(OBJS) | ||
$(CXX) $(CXXFLAGS) -o $(PROG) $(OBJS) $(INCS) $(LDFLAGS) | ||
single: | ||
@$(CXX) $(SRCS) $(CXXFLAGS) -o $(PROG) $(INCS) $(LDFLAGS) | ||
|
||
%.o: %.cpp | ||
$(CXX) $(CXXFLAGS) -c $< $(LIBS) $(INCS) -o $@ | ||
multi: | ||
@$(CXX) $(SRCS) $(CXXFLAGS) -o $(PROG) $(INCS) $(LDFLAGS) -DMULTISERVICE | ||
|
||
.PHONY: $(SUBDIRS) | ||
|
||
clean: | ||
rm -f *.o $(PROG) | ||
@rm -f *.o $(PROG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#ifndef SERVICES_H | ||
#define SERVICES_H | ||
|
||
/* | ||
* uid - to match with the sqlite services uid | ||
*/ | ||
struct services_info | ||
{ | ||
int uid; | ||
}; | ||
|
||
struct services_info service[] = | ||
{ | ||
{1000}, | ||
{1001} | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters