diff options
author | sanine <sanine.not@pm.me> | 2022-10-01 20:59:36 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-10-01 20:59:36 -0500 |
commit | c5fc66ee58f2c60f2d226868bb1cf5b91badaf53 (patch) | |
tree | 277dd280daf10bf77013236b8edfa5f88708c7e0 /libs/ode-0.16.1/ou/build/make | |
parent | 1cf9cc3408af7008451f9133fb95af66a9697d15 (diff) |
add ode
Diffstat (limited to 'libs/ode-0.16.1/ou/build/make')
-rw-r--r-- | libs/ode-0.16.1/ou/build/make/makefile | 219 | ||||
-rw-r--r-- | libs/ode-0.16.1/ou/build/make/makefile.os | 41 |
2 files changed, 260 insertions, 0 deletions
diff --git a/libs/ode-0.16.1/ou/build/make/makefile b/libs/ode-0.16.1/ou/build/make/makefile new file mode 100644 index 0000000..bf8a8d6 --- /dev/null +++ b/libs/ode-0.16.1/ou/build/make/makefile @@ -0,0 +1,219 @@ +PRODUCTNAME = ou +MODE ?= DEVELOP +BITS ?= 32 + +include makefile.os + +CXX = gcc +AR = ar +LD = gcc + +CXXFLAGS = -fno-exceptions -fno-rtti -Wall -g +ARFLAGS = -r +LDFLAGS = -fno-exceptions -fno-rtti -g + +ifeq ($(OS_PLATFORM), i386) +ifneq ($(BITS), 64) + +CXXFLAGS += -malign-double + +endif +endif + +ifeq ($(MODE), DEBUG) + +CXXFLAGS += -D_DEBUG +CXXFLAGS += -O0 + +else +ifeq ($(MODE), RELEASE) + +CXXFLAGS += -DNDEBUG +CXXFLAGS += -O3 -funroll-loops + +else + +CXXFLAGS += -O2 + +endif +endif + +ifeq ($(BITS), 64) + +CXXFLAGS += -m64 +LDFLAGS += -m64 + +else + +CXXFLAGS += -m32 +LDFLAGS += -m32 + +endif + + +SRCEXT=.cpp +OBJEXT=$(OS_OBJ_EXT) + +OUTNAME := $(PRODUCTNAME) +OUTDIR = ../../lib/ +OUTEXT=$(OS_LIB_EXT) + +TESTNAME := $(PRODUCTNAME)test +TESTDIR = ../../bin/ +TESTEXT=$(OS_EXE_EXT) + +REFINEDCXX = $(notdir $(CXX)) +OUTINTDIR := ../../intermediate/$(REFINEDCXX)/ +TESTINTDIR := ../../intermediate/$(REFINEDCXX)_$(TESTNAME)/ + + +ifeq ($(MODE), DEBUG) + +OUTINTDIR := $(OUTINTDIR)debug +TESTINTDIR := $(TESTINTDIR)debug + +else +ifeq ($(MODE), RELEASE) + +OUTINTDIR := $(OUTINTDIR)release +TESTINTDIR := $(TESTINTDIR)release + +else + +OUTINTDIR := $(OUTINTDIR)develop +TESTINTDIR := $(TESTINTDIR)develop + +endif +endif + +ifeq ($(BITS), 64) + +OUTINTDIR := $(OUTINTDIR)64 +TESTINTDIR := $(TESTINTDIR)64 + + +OUTNAME := $(OUTNAME)64 +TESTNAME := $(TESTNAME)64 + +endif + +ifeq ($(MODE), DEBUG) + +OUTNAME := $(OUTNAME)_debug +TESTNAME := $(TESTNAME)_debug + +endif + +ifeq ($(MODE), RELEASE) + +OUTNAME := $(OUTNAME)_release +TESTNAME := $(TESTNAME)_release + +endif + +OUTINTDIR := $(OUTINTDIR)/ +TESTINTDIR := $(TESTINTDIR)/ + +OUTPATH = $(OUTDIR)$(OS_LIB_PRE)$(OUTNAME)$(OUTEXT) +TESTPATH = $(TESTDIR)$(TESTNAME)$(TESTEXT) + +ININCDIR = ../../include +INDIR = ../../src/ou/ + +INFILES = \ + atomic \ + customization \ + malloc \ + threadlocalstorage + +INOBJS = $(addprefix $(OUTINTDIR), $(addsuffix $(OBJEXT), $(INFILES))) + + +TESTINCDIR = $(ININCDIR) +TESTLIBDIR = $(OUTDIR) +TESTLIBS = $(OUTNAME) +TESTSRCDIR = ../../test/ + +ifeq ($(OS_TYPE), Linux) +TESTLIBS += pthread +endif + +ifeq ($(OS_TYPE), SUN) +TESTLIBS += pthread c +endif + + +TESTFILES = outest + +TESTOBJS = $(addprefix $(TESTINTDIR), $(addsuffix $(OBJEXT), $(TESTFILES))) + + +.PHONY: develop debug release develop64 debug64 release64 all ou + +all: develop + +develop: + $(MAKE) ou MODE=DEVELOP BITS=32 + +debug: + $(MAKE) ou MODE=DEBUG BITS=32 + +release: + $(MAKE) ou MODE=RELEASE BITS=32 + +develop64: + $(MAKE) ou MODE=DEVELOP BITS=64 + +debug64: + $(MAKE) ou MODE=DEBUG BITS=64 + +release64: + $(MAKE) ou MODE=RELEASE BITS=64 + +ou: $(OUTPATH) $(TESTPATH) + + +.PHONY: mkoutintpath mkoutpath mktestintpath mktestpath + +$(OUTPATH): mkoutintpath mkoutpath $(INOBJS) + $(OS_VP)echo BUILDING $(notdir $(OUTPATH))... + $(OS_VP)$(AR) $(ARFLAGS) $(OUTPATH) $(INOBJS) + +$(TESTPATH): mktestintpath mktestpath $(OUTPATH) $(TESTOBJS) + $(OS_VP)echo LINKING $(notdir $(TESTPATH))... + $(OS_VP)$(LD) $(LDFLAGS) $(LDADDFLAGS) -o $(TESTPATH) \ + $(addprefix -I, $(TESTINCDIR) $(OS_INCLUDE_PATH)) \ + $(addprefix -L, $(TESTLIBDIR) $(OS_LIB_PATH)) \ + $(TESTOBJS) \ + $(addprefix -l, $(TESTLIBS)) + +$(OUTINTDIR)%$(OBJEXT): $(INDIR)%$(SRCEXT) + $(OS_VP)echo Compiling $(notdir $@)... + $(OS_VP)$(CXX) $(CXXFLAGS) $(CXXADDFLAGS) -c -o $@ \ + $(addprefix -I, $(ININCDIR) $(OS_INCLUDE_PATH)) \ + $< + +$(TESTINTDIR)%$(OBJEXT): $(TESTSRCDIR)%$(SRCEXT) + $(OS_VP)echo Compiling $(notdir $@)... + $(OS_VP)$(CXX) $(CXXFLAGS) $(CXXADDFLAGS) -c -o $@ \ + $(addprefix -I, $(TESTINCDIR) $(OS_INCLUDE_PATH)) \ + $< + + +mkoutintpath: + $(call FN_MKDIR, $(OUTINTDIR)) + +mktestintpath: + $(call FN_MKDIR, $(TESTINTDIR)) + +mkoutpath: + $(call FN_MKDIR, $(OUTDIR)) + +mktestpath: + $(call FN_MKDIR, $(TESTDIR)) + + +.PHONY: runtest + +runtest: $(TESTPATH) + $(TESTPATH) diff --git a/libs/ode-0.16.1/ou/build/make/makefile.os b/libs/ode-0.16.1/ou/build/make/makefile.os new file mode 100644 index 0000000..7b7cf13 --- /dev/null +++ b/libs/ode-0.16.1/ou/build/make/makefile.os @@ -0,0 +1,41 @@ +ifeq ($(OS), Windows_NT) + +OS_TYPE = WIN32 +OS_PLATFORM := i386 + +OS_OBJ_EXT = .obj +OS_LIB_EXT = .lib +OS_LIB_PRE = +OS_EXE_EXT = .exe + +FN_CONVERT_PATH = $(subst /,\,$(subst //,/,$(1))) + +FN_RM = $(OS_VP)erase "$(strip $(call FN_CONVERT_PATH, $(1)))" +FN_MKDIR = $(OS_VP)if NOT EXIST "$(strip $(call FN_CONVERT_PATH, $(1)))" mkdir "$(strip $(call FN_CONVERT_PATH, $(1)))" + +OS_INCLUDE_PATH = $(GCC_PATH)/include $(GCC_PATH)/include/win32 +OS_LIB_PATH += $(GCC_PATH)/lib $(GCC_PATH)/lib/win32 +OS_VP=@ + +else + +OS_OBJ_EXT = .o +OS_LIB_EXT = .a +OS_LIB_PRE = lib +OS_EXE_EXT = + +OS_TYPE = $(subst SunOS,SUN,$(shell uname)) +OS_PLATFORM := $(shell uname -p) +OS_PLATFORM := $(subst x86_64,i386,$(OS_PLATFORM)) +OS_PLATFORM := $(subst i586,i386,$(OS_PLATFORM)) +OS_PLATFORM := $(subst i686,i386,$(OS_PLATFORM)) + +FN_RM = $(OS_VP)rm -rf $(1) +FN_MKDIR = $(OS_VP)test -d $(1) || mkdir -p $(patsubst %/,%,$(1)) + +OS_INCLUDE_PATH = /include /usr/include +OS_LIB_PATH = /lib /usr/lib +OS_VP=@ + +endif + |