Initial import
This commit is contained in:
commit
8d7562cd14
7 changed files with 847 additions and 0 deletions
51
Makefile
Normal file
51
Makefile
Normal file
|
@ -0,0 +1,51 @@
|
|||
BUILD := $(shell date -u +%Y%m%d-%H%M%S)
|
||||
OS := $(shell uname -s)
|
||||
|
||||
TOOLKIT = ../..
|
||||
|
||||
DIRECTORIES = \
|
||||
$(TOOLKIT)/Common \
|
||||
$(TOOLKIT)/KAIROS
|
||||
|
||||
ifeq ($(OS), Linux)
|
||||
LIBRARIES += \
|
||||
rt
|
||||
DEPENDENCIES = \
|
||||
openssl
|
||||
endif
|
||||
|
||||
ifeq ($(OS), Darwin)
|
||||
CFLAGS += \
|
||||
-Wno-deprecated-declarations \
|
||||
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-migrator/sdk/MacOSX.sdk/usr/include/
|
||||
LIBRARIES += \
|
||||
crypto
|
||||
endif
|
||||
|
||||
OBJECTS = \
|
||||
CronosAgent.o
|
||||
|
||||
FLAGS := -g -fno-omit-frame-pointer -O3 -MMD $(foreach directory, $(DIRECTORIES), -I$(directory)) -DBUILD=\"$(BUILD)\"
|
||||
LIBS := -lstdc++ $(foreach library, $(LIBRARIES), -l$(library))
|
||||
|
||||
CC = gcc
|
||||
CFLAGS += $(FLAGS) -std=gnu99
|
||||
|
||||
ifeq ($(OS), Linux)
|
||||
FLAGS += $(shell pkg-config --cflags $(DEPENDENCIES)) -rdynamic
|
||||
LIBS += $(shell pkg-config --libs $(DEPENDENCIES))
|
||||
endif
|
||||
|
||||
all: build
|
||||
|
||||
build: $(PREREQUISITES) $(OBJECTS)
|
||||
$(CC) $(OBJECTS) $(FLAGS) $(LIBS) -o cronosagent
|
||||
|
||||
clean:
|
||||
rm -f $(PREREQUISITES) $(OBJECTS) cronosagent
|
||||
rm -f *.d $(TOOLKIT)/*/*.d
|
||||
|
||||
version:
|
||||
echo "#define VERSION $(shell svn info | grep -E "^Revision:" | grep -o -E "[0-9]+")" > Version.h
|
||||
|
||||
.PHONY: all build clean install
|
Loading…
Add table
Add a link
Reference in a new issue