Skip to content
Permalink
Browse files

Update Makefile, build script

  • Loading branch information
nickolasburr committed Sep 14, 2017
1 parent 4c10f27 commit f8661081a626deaeb2ea5d35e6f5f131d442eb4d
Showing with 15 additions and 11 deletions.
  1. +5 −3 Makefile
  2. +10 −8 tools/build.sh
@@ -27,7 +27,7 @@ LG2_INC = $(LG2_DIR)/include

KERNEL := $(shell sh -c 'uname -s 2>/dev/null || echo unknown')

CFLAGS = -ggdb -I$(INCLUDE) -I$(LG2_INC) -Wall -Wextra
CFLAGS = -I$(INCLUDE) -I$(LG2_INC)
LDFLAGS = -pthread -lssl -lcrypto -lz

ifeq "$(KERNEL)" "Darwin"
@@ -36,12 +36,14 @@ endif

.PHONY: all build clean install uninstall

all: build $(TARGET)
all: $(TARGET)

build:
@cd $(TOOLS) && ./build.sh

$(TARGET): $(CSFILES)
$(LG2_ARC): build

$(TARGET): $(CSFILES) $(LG2_ARC)
$(CC) $(CFLAGS) -o $@ $^ $(LG2_ARC) $(LDFLAGS)

clean:
@@ -22,14 +22,16 @@ fi

cd $LG2_BUILD_DIR &&

cmake -DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DUSE_SSH=OFF \
-DCURL=OFF \
-DCMAKE_C_FLAGS=-fPIC \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX="$BUILD_DIR" \
cmake -DTHREADSAFE=ON \
-DBUILD_CLAR=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DUSE_SSH=OFF \
-DCURL=OFF \
-DCMAKE_C_FLAGS=-fPIC \
-DCMAKE_C_ARCHIVE_CREATE="<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>" \
-DCMAKE_C_ARCHIVE_FINISH="<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>" \
-DCMAKE_BUILD_TYPE="RelWithDebInfo" \
-DCMAKE_INSTALL_PREFIX="$BUILD_DIR" \
.. &&

cmake --build .

0 comments on commit f866108

Please sign in to comment.
You can’t perform that action at this time.