Fixes for Linux building
This commit is contained in:
29
Makefile
29
Makefile
@@ -1,20 +1,21 @@
|
|||||||
|
|
||||||
IsMinGW=$(findstring MSYS,$(shell uname -s)) $(findstring MINGW,$(shell uname -s))
|
|
||||||
|
IsMinGW := $(findstring MSYS,$(shell uname -s))$(findstring MINGW,$(shell uname -s))
|
||||||
ifneq (,$(IsMinGW))
|
ifneq (,$(IsMinGW))
|
||||||
RES_APP = filesync.exe
|
RES_APP := filesync.exe
|
||||||
BUILDDIR = build-mingw
|
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||||
else
|
else
|
||||||
RES_APP = filesync
|
RES_APP := filesync
|
||||||
BUILDDIR = build-linux
|
BUILDDIR := build-$(shell gcc -v 2>&1 | grep "Target:" | cut --delimiter=' ' --fields=2)
|
||||||
endif
|
endif
|
||||||
VERBOSE_BUILD=false
|
VERBOSE_BUILD=false
|
||||||
|
|
||||||
CC = gcc
|
CC := gcc
|
||||||
RM = rm -f
|
RM := rm -f
|
||||||
ECHO = echo
|
ECHO := echo
|
||||||
MKDIR = mkdir
|
MKDIR := mkdir
|
||||||
|
|
||||||
HEADS = \
|
HEADS := \
|
||||||
src/util.h \
|
src/util.h \
|
||||||
src/crc.h \
|
src/crc.h \
|
||||||
src/fileutil.h \
|
src/fileutil.h \
|
||||||
@@ -23,7 +24,7 @@ HEADS = \
|
|||||||
src/actionfilenodesync.h \
|
src/actionfilenodesync.h \
|
||||||
src/actionfilenodecopy.h
|
src/actionfilenodecopy.h
|
||||||
|
|
||||||
OBJS_BASE = \
|
OBJS_BASE := \
|
||||||
$(BUILDDIR)/util.o \
|
$(BUILDDIR)/util.o \
|
||||||
$(BUILDDIR)/crc.o \
|
$(BUILDDIR)/crc.o \
|
||||||
$(BUILDDIR)/fileutil.o \
|
$(BUILDDIR)/fileutil.o \
|
||||||
@@ -32,12 +33,12 @@ OBJS_BASE = \
|
|||||||
$(BUILDDIR)/actionfilenodesync.o \
|
$(BUILDDIR)/actionfilenodesync.o \
|
||||||
$(BUILDDIR)/actionfilenodecopy.o
|
$(BUILDDIR)/actionfilenodecopy.o
|
||||||
|
|
||||||
OBJS_APP = \
|
OBJS_APP := \
|
||||||
$(OBJS_BASE) \
|
$(OBJS_BASE) \
|
||||||
$(BUILDDIR)/main.o
|
$(BUILDDIR)/main.o
|
||||||
|
|
||||||
CFLAGS = -g
|
CFLAGS := -g
|
||||||
LIBS = -lm
|
LIBS := -lm
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(VERBOSE_BUILD),true)
|
ifeq ($(VERBOSE_BUILD),true)
|
||||||
|
|||||||
Reference in New Issue
Block a user