Skip to content

Commit

Permalink
More accurate C flags and library configuration in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
franko committed Aug 26, 2013
1 parent 7a5c40c commit 6671c72
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 12 deletions.
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -26,6 +26,8 @@ include makedefs
GSH_BASE_DIR = .

INCLUDES += -I. $(GSL_INCLUDES) -Iagg-plot -Ilua-gsl
LIBS += $(PTHREAD_LIBS)
DEFS += $(PTHREAD_DEFS) $(GSL_SHELL_DEFS)
CFLAGS += $(LUA_CFLAGS)

ifeq ($(HOST_SYS),Windows)
Expand Down Expand Up @@ -141,7 +143,7 @@ $(GSL_SHELL): $(LUAGSL_OBJ_FILES) $(LUAGSL_LIBS) $(GSL_SHELL_DEP) $(SUBDIRS)

$(GSL_SHELL_GUI): $(FOXGUI_LIB) $(LUAGSL_LIBS) $(GSL_SHELL_DEP) $(SUBDIRS) $(FOXGUI_DIR)
@echo Linking $@
$(LINK_EXE) -o $@ $(FOXGUI_LIB) $(LUAGSL_LIBS) $(LIBS) $(FOX_LIBS) $(FOXGUI_LDFLAGS)
$(LINK_EXE) -o $@ $(FOXGUI_LIB) $(LUAGSL_LIBS) $(LIBS) $(FOX_LIBS) $(FOXGUI_LDFLAGS) $(CPP_SUP_LIBS)

install: $(GSL_SHELL) $(GSL_SHELL_GUI)
mkdir -p $(INSTALL_BIN_DIR)
Expand Down
2 changes: 2 additions & 0 deletions agg-plot/Makefile
Expand Up @@ -36,6 +36,8 @@ else
endif

INCLUDES += $(FREETYPE_INCLUDES) $(AGG_INCLUDES) -I$(GSH_BASE_DIR) -I$(GSH_BASE_DIR)/lua-gsl -I$(LUADIR)/src -I$(GSH_BASE_DIR)/cpp-utils
LIBS += $(PTHREAD_LIBS)
DEFS += $(PTHREAD_DEFS) $(GSL_SHELL_DEFS)
CFLAGS += $(LUA_CFLAGS)

AGGPLOT_SRC_FILES = $(PLATSUP_SRC_FILES) printf_check.cpp fonts.cpp gamma.cpp agg_font_freetype.cpp plot.cpp plot-auto.cpp utils.cpp units.cpp colors.cpp markers.cpp draw_svg.cpp canvas_svg.cpp lua-draw.cpp lua-text.cpp text.cpp agg-parse-trans.cpp window_registry.cpp window.cpp lua-plot.cpp canvas-window.cpp bitmap-plot.cpp lua-graph.cpp
Expand Down
1 change: 1 addition & 0 deletions fox-gui/Makefile
Expand Up @@ -27,6 +27,7 @@ include $(GSH_BASE_DIR)/makedefs

INCLUDES += -I$(GSH_BASE_DIR) -I$(GSH_BASE_DIR)/lua-gsl -I$(GSH_BASE_DIR)/agg-plot -I$(LUADIR)/src -I$(GSH_BASE_DIR)/cpp-utils
INCLUDES += $(AGG_INCLUDES) $(FOX_INCLUDES) $(FREETYPE_INCLUDES) $(PTHREADS_CFLAGS)
DEFS += $(PTHREAD_DEFS) $(GSL_SHELL_DEFS)

FOXGUI_SRC_FILES = io_thread.cpp window_surface.cpp fx_console.cpp redirect.cpp gsl_shell_interp.cpp gsl_shell_thread.cpp fox_gsl_shell.cpp gsl_shell_window.cpp window_part.cpp fx_plot_canvas.cpp fx_plot_window.cpp lua_plot_window.cpp gsl_shell_app.cpp gsl-shell-fox.cpp
FOXGUI_OBJ_FILES := $(FOXGUI_SRC_FILES:%.cpp=%.o)
Expand Down
6 changes: 3 additions & 3 deletions gdt/Makefile
Expand Up @@ -26,9 +26,9 @@ include $(GSH_BASE_DIR)/makepackages
include $(GSH_BASE_DIR)/makedefs

INCLUDES += -I$(GSH_BASE_DIR)

CFLAGS += -std=c99
CFLAGS += $(LUA_CFLAGS)
LIBS += $(PTHREAD_LIBS)
DEFS += $(PTHREAD_DEFS) $(GSL_SHELL_DEFS)
CFLAGS += -std=c99 $(LUA_CFLAGS)

GDT_SRC_FILES = char_buffer.c gdt_index.c gdt_table.c
GDT_OBJ_FILES := $(GDT_SRC_FILES:%.c=%.o)
Expand Down
2 changes: 2 additions & 0 deletions lua-gsl/Makefile
Expand Up @@ -26,6 +26,8 @@ include $(GSH_BASE_DIR)/makepackages
include $(GSH_BASE_DIR)/makedefs

INCLUDES += -I$(GSH_BASE_DIR)
LIBS += $(PTHREAD_LIBS)
DEFS += $(PTHREAD_DEFS) $(GSL_SHELL_DEFS)
CFLAGS += $(LUA_CFLAGS)

LUAGSL_SRC_FILES = lua-properties.c gs-types.c lua-utils.c lua-gsl.c str.c fatal.c
Expand Down
16 changes: 8 additions & 8 deletions makedefs
Expand Up @@ -64,8 +64,8 @@ else
CXXFLAGS = -Os -fno-exceptions -fno-stack-protector -ffast-math -fno-rtti -Wall
endif

DEFS += -D_REENTRANT
LIBS += -lsupc++
PTHREAD_DEFS += -D_REENTRANT
CPP_SUP_LIBS = -lsupc++

ifeq ($(HOST_SYS),Windows)
DEFS += -DWIN32
Expand All @@ -76,8 +76,8 @@ ifeq ($(HOST_SYS),Windows)
LUAJIT_DLL = lua$(NODOTABIVER)
LUAJIT_SO = $(GSH_DLL_LIBDIR)/$(LUAJIT_DLL).dll
else
DEFS += -pthread
LIBS += -pthread
PTHREAD_DEFS += -pthread
PTHREAD_LIBS += -pthread

GSL_SHELL = gsl-shell
GSL_SHELL_GUI = gsl-shell-gui
Expand All @@ -86,20 +86,20 @@ else
endif

ifeq ($(strip $(DEBUG)), yes)
DEFS += -DGSL_SHELL_DEBUG
GSL_SHELL_DEFS += -DGSL_SHELL_DEBUG
endif

ifeq ($(strip $(DISABLE_GAMMA_CORR)), yes)
DEFS += -DDISABLE_GAMMA_CORR
GSL_SHELL_DEFS += -DDISABLE_GAMMA_CORR
endif

ifeq ($(strip $(DISABLE_SUBPIXEL_LCD)), yes)
DEFS += -DDISABLE_SUBPIXEL_AA
GSL_SHELL_DEFS += -DDISABLE_SUBPIXEL_AA
endif

ifeq ($(strip $(USE_READLINE)),yes)
ifneq ($(HOST_SYS),Windows)
DEFS += -DUSE_READLINE
GSL_SHELL_DEFS += -DUSE_READLINE
else
USE_READLINE = no
endif
Expand Down

0 comments on commit 6671c72

Please sign in to comment.