Skip to content

Commit

Permalink
additional cleanup to pass only command line CFLAGS, etc to external …
Browse files Browse the repository at this point in the history
…make
  • Loading branch information
vtjnash committed Mar 25, 2012
1 parent 3010113 commit 89bb894
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 10 deletions.
3 changes: 0 additions & 3 deletions Make.inc
Expand Up @@ -170,7 +170,4 @@ QUIET_PERL = @printf ' %b %b\n' $(PERLCOLOR)PERL$(ENDCOLOR) $(BINCOLOR)$(GOAL
QUIET_FLISP = @printf ' %b %b\n' $(FLISPCOLOR)FLISP$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR);
QUIET_JULIA = @printf ' %b %b\n' $(JULIACOLOR)JULIA$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR);

# Compiler variables
override CFLAGS += $(JCFLAGS)
override CXXFLAGS += $(JCXXFLAGS)

4 changes: 2 additions & 2 deletions external/Makefile
Expand Up @@ -235,7 +235,7 @@ install-amos: $(AMOS_OBJ_TARGET)
$(AMOS_OBJ_SOURCE): amos/*.f
cd amos && \
$(MAKE) $(jPARALLEL_BUILD_JOBS) && \
$(FC) -shared *.o -o libamos.$(SHLIB_EXT)
$(FC) $(FFLAGS) -shared *.o -o libamos.$(SHLIB_EXT)
$(AMOS_OBJ_TARGET): $(AMOS_OBJ_SOURCE)
mkdir -p $(EXTROOTLIB)
cp $< $@
Expand Down Expand Up @@ -264,7 +264,7 @@ random/jl_random.c: random/dsfmt-$(DSFMT_VER).tar.gz
touch $@
$(DSFMT_OBJ_SOURCE): random/jl_random.c
cd random && \
$(CC) -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes -Wall -std=c99 -DDSFMT_MEXP=19937 -fPIC -shared -DDSFMT_DO_NOT_USE_OLD_NAMES jl_random.c -o librandom.$(SHLIB_EXT)
$(CC) $(CFLAGS) -O3 -finline-functions -fomit-frame-pointer -DNDEBUG -fno-strict-aliasing --param max-inline-insns-single=1800 -Wmissing-prototypes -Wall -std=c99 -DDSFMT_MEXP=19937 -fPIC -shared -DDSFMT_DO_NOT_USE_OLD_NAMES jl_random.c -o librandom.$(SHLIB_EXT)

$(DSFMT_OBJ_TARGET): $(DSFMT_OBJ_SOURCE)
mkdir -p $(EXTROOTLIB)
Expand Down
10 changes: 6 additions & 4 deletions extras/Makefile
Expand Up @@ -34,11 +34,12 @@ distclean: $(addprefix distclean-, $(LIBS))

ifeq ($(USE_SYSTEM_GLPK), 1)
GLPK_PREFIX = /usr/
GLPK_OBJ_TARGET =
else
GLPK_PREFIX = glpk-$(GLPK_VER)/
GLPK_OBJ_TARGET = $(EXTROOTLIB)/libglpk.$(SHLIB_EXT)
endif

GLPK_OBJ_TARGET = $(EXTROOTLIB)/libglpk.$(SHLIB_EXT)

compile-glpk: install-glpk
install-glpk: $(GLPK_OBJ_TARGET) $(EXTROOTLIB)/libglpk_wrapper.$(SHLIB_EXT) glpk_h.jl
Expand All @@ -60,8 +61,8 @@ glpk_h.jl:
$(QUIET_PERL) cpp -dM $(GLPK_PREFIX)/include/glpk.h | perl -nle '/^\s*#define\s+(GLP\w*)\s*\(?($(GLPK_CONST))\)?\s*$$/ and print "const $$1 = int32($$2)"' | sort > $@

clean-glpk:
$(MAKE) $(jPARALLEL_BUILD_JOBS) -C glpk-$(GLPK_VER) uninstall || true
$(MAKE) $(jPARALLEL_BUILD_JOBS) -C glpk-$(GLPK_VER) clean
-$(MAKE) $(jPARALLEL_BUILD_JOBS) -C glpk-$(GLPK_VER) uninstall || true
-$(MAKE) $(jPARALLEL_BUILD_JOBS) -C glpk-$(GLPK_VER) clean
rm -f glpk_h.jl
distclean-glpk: clean-glpk
rm -rf glpk-$(GLPK_VER).tar.bz2 glpk-$(GLPK_VER)
Expand All @@ -79,7 +80,8 @@ endif


$(EXTROOTLIB)/libglpk_wrapper.$(SHLIB_EXT): glpk_wrapper.c $(GLPK_OBJ_TARGET)
$(CC) -O2 -shared -fPIC $(GLPKW_INC) glpk_wrapper.c $(GLPKW_LIB) -o $(EXTROOTLIB)/libglpk_wrapper.$(SHLIB_EXT) -Wl,-rpath,$(EXTROOTLIB)
mkdir -p $(EXTROOTLIB)
$(CC) $(CFLAGS) $(LDFLAGS) -O2 -shared -fPIC $(GLPKW_INC) glpk_wrapper.c $(GLPKW_LIB) -o $(EXTROOTLIB)/libglpk_wrapper.$(SHLIB_EXT) -Wl,-rpath,$(EXTROOTLIB)
touch $@
install-glpk-wrapper: $(EXTROOTLIB)/libglpk_wrapper.$(SHLIB_EXT) glpk_wrapper.c

Expand Down
5 changes: 4 additions & 1 deletion src/Makefile
@@ -1,6 +1,9 @@
JULIAHOME = $(abspath ..)
include $(JULIAHOME)/Make.inc

override CFLAGS += $(JCFLAGS)
override CXXFLAGS += $(JCXXFLAGS)

SRCS = \
jltypes gf ast builtins module codegen interpreter \
alloc dlload sys init task array dump
Expand All @@ -20,7 +23,7 @@ SRCS += gc
endif

ifeq ($(USE_COPY_STACKS),1)
override CFLAGS += -DCOPY_STACKS
JCFLAGS += -DCOPY_STACKS
endif

default: release
Expand Down
3 changes: 3 additions & 0 deletions src/flisp/Makefile
@@ -1,6 +1,9 @@
JULIAHOME = $(abspath ../..)
include $(JULIAHOME)/Make.inc

override CFLAGS += $(JCFLAGS)
override CXXFLAGS += $(JCXXFLAGS)

NAME = flisp
EXENAME = $(NAME)
LIBTARGET = lib$(NAME)
Expand Down
3 changes: 3 additions & 0 deletions src/support/Makefile
@@ -1,6 +1,9 @@
JULIAHOME = $(abspath ../..)
include $(JULIAHOME)/Make.inc

override CFLAGS += $(JCFLAGS)
override CXXFLAGS += $(JCXXFLAGS)

SRCS = hashing.c timefuncs.c dblprint.c ptrhash.c operators.c socket.c \
utf8.c ios.c dirpath.c htable.c bitvector.c \
int2str.c dump.c libsupportinit.c arraylist.c
Expand Down
3 changes: 3 additions & 0 deletions ui/Makefile
@@ -1,6 +1,9 @@
JULIAHOME = $(abspath ..)
include $(JULIAHOME)/Make.inc

override CFLAGS += $(JCFLAGS)
override CXXFLAGS += $(JCXXFLAGS)

FLAGS = -Wall -Wno-strict-aliasing -fno-omit-frame-pointer \
-I$(JULIAHOME)/src -I$(JULIAHOME)/src/support -I$(EXTROOT)/include $(CFLAGS)

Expand Down
3 changes: 3 additions & 0 deletions ui/webserver/Makefile
@@ -1,6 +1,9 @@
JULIAHOME = $(abspath ../..)
include $(JULIAHOME)/Make.inc

override CFLAGS += $(JCFLAGS)
override CXXFLAGS += $(JCXXFLAGS)

LIBS = -lpthread

WEBSERVER_SRCS = webserver.cpp server.cpp network.cpp jsoncpp.cpp
Expand Down

0 comments on commit 89bb894

Please sign in to comment.