This repository has been archived by the owner on Oct 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed build issues with GNUC under Linux.
Added (and fixed) makefile support for Shiny lib, Shiny Lua lib and examples.
- Loading branch information
dermaxi
committed
Mar 23, 2013
1 parent
37c43ef
commit 3a8723b
Showing
23 changed files
with
342 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Shiny Profiler | ||
# Advanced sample GNU Makefile | ||
# | ||
# You have to build libShiny.a first in 'Shiny' directory. | ||
|
||
TARGET = Advanced | ||
|
||
CXXFLAGS = -g -Wall | ||
INCLUDES = -I../../Shiny/include | ||
LFLAGS = -L../../Shiny/lib/ | ||
LIBS = -lShiny | ||
|
||
SRCS = $(wildcard *.cpp) | ||
|
||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(SRCS) | ||
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $^ $(LFLAGS) $(LIBS) | ||
|
||
clean: | ||
$(RM) $(TARGET) $(OBJS) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Shiny Profiler | ||
# MainLoop sample GNU Makefile | ||
# | ||
# You have to build libShiny.a first in 'Shiny' directory. | ||
|
||
TARGET = MainLoop | ||
CXXFLAGS = -g -Wall | ||
INCLUDES = -I../../Shiny/include | ||
LFLAGS = -L../../Shiny/lib/ | ||
LIBS = -lShiny | ||
SRCS = MainLoop.cpp | ||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(SRCS) | ||
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $^ $(LFLAGS) $(LIBS) | ||
|
||
clean: | ||
$(RM) $(TARGET) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Shiny Profiler | ||
# Simple sample GNU Makefile | ||
# | ||
# You have to build libShiny.a first in 'Shiny' directory. | ||
|
||
TARGET = Simple | ||
CXXFLAGS = -g -Wall | ||
INCLUDES = -I../../Shiny/include | ||
LFLAGS = -L../../Shiny/lib/ | ||
LIBS = -lShiny | ||
SRCS = Simple.cpp | ||
|
||
all: $(TARGET) | ||
|
||
$(TARGET): $(SRCS) | ||
$(CXX) $(CXXFLAGS) $(INCLUDES) -o $@ $^ $(LFLAGS) $(LIBS) | ||
|
||
clean: | ||
$(RM) $(TARGET) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Shiny Profiler | ||
# GNU Makefile for Linux | ||
# | ||
# By default libShiny.a will be compiled with g++ C++ compiler. If you prefer | ||
# or need a plain C version use the 'cclib' target. The C compiled lib should | ||
# be compatible to C AND C++ code according to ISO C99 and ISO C++98 (or | ||
# later). | ||
# | ||
# To build Shiny as a static C++ lib use: | ||
# | ||
# make | ||
# | ||
# To build it as a static C lib (ISO C99) use: | ||
# | ||
# make cclib | ||
# | ||
# For building libs including more debug support use: | ||
# | ||
# make cxxdebug | ||
# or | ||
# make ccdebug | ||
# | ||
# If you experience incompatibilities please feel free to tailor this makefile | ||
# to your needs and report problems here: | ||
# - sourceforge: http:https://sourceforge.net/projects/shinyprofiler/ | ||
# - Google Code: http:https://code.google.com/p/shinyprofiler/ | ||
|
||
|
||
SRCS = $(wildcard src/*.c) | ||
OBJS = $(SRCS:.c=.o) | ||
|
||
LIB_NAME = libShiny.a | ||
LIB_PATH = lib | ||
LIB_PATH_DEBUG = lib/debug | ||
|
||
|
||
################## | ||
# Compiler options | ||
FLAGS = -g -O3 -fPIC -Wall | ||
INCLUDE = -Iinclude | ||
|
||
# C options | ||
cclib ccdebug: CCOMP = $(CC) | ||
cclib: FLAGS += -std=c99 | ||
|
||
# C++ options | ||
cxxlib cxxdebug: CCOMP = $(CXX) | ||
|
||
# Debug options | ||
ccdebug cxxdebug: FLAGS = -g -ggdb3 -O0 -Wall | ||
ccdebug cxxdebug: LIB_PATH = $(LIB_PATH_DEBUG) | ||
|
||
|
||
################## | ||
# Target definitions | ||
|
||
# All target builds static C++ lib | ||
all: cxxlib | ||
|
||
# Copy static lib into lib/ or lib/debug | ||
cclib cxxlib ccdebug cxxdebug: $(LIB_NAME) | ||
mkdir -p $(LIB_PATH) | ||
mv $^ $(LIB_PATH) | ||
|
||
# Build static lib in either C or C++ | ||
$(LIB_NAME): $(OBJS) | ||
$(AR) rcs $@ $^ | ||
|
||
# Create object files from source code | ||
.c.o: | ||
$(CCOMP) $(FLAGS) $(INCLUDE) -c $< -o $@ | ||
|
||
|
||
# Remove temporary files and compilation results | ||
clean: | ||
$(RM) $(OBJS) $(LIB_PATH)/$(LIB_NAME) $(LIB_PATH_DEBUG)/$(LIB_NAME) | ||
|
||
|
||
help: | ||
@echo "Available targets for Shiny" | ||
@echo " cxxlib: Build static library libShiny.a using C++ compiler" | ||
@echo " cclib: Build static library libShiny.a using C compiler" | ||
@echo "" | ||
@echo " cxxdebug: Build static library libShiny.a with debug symbols using C++ compiler" | ||
@echo " ccdebug: Build static library libShiny.a with debug symbols using C compiler" | ||
@echo "" | ||
@echo " clean: Clean up directories" | ||
|
||
.PHONY: all cclib cxxlib ccdebug cxxdebug help clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.