diff options
author | David M. Lee <dlee@digium.com> | 2013-01-07 14:24:28 -0600 |
---|---|---|
committer | David M. Lee <dlee@digium.com> | 2013-01-07 14:24:28 -0600 |
commit | f3ab456a17af1c89a6e3be4d20c5944853df1cb0 (patch) | |
tree | d00e1a332cd038a6d906a1ea0ac91e1a4458e617 /build |
Import pjproject-2.0.1
Diffstat (limited to 'build')
40 files changed, 791 insertions, 0 deletions
diff --git a/build/cc-auto.mak.in b/build/cc-auto.mak.in new file mode 100644 index 0000000..bc56567 --- /dev/null +++ b/build/cc-auto.mak.in @@ -0,0 +1,21 @@ +export CC = @CC@ -c +export CXX = @CXX@ -c +export AR = @AR@ +export LD = @LD@ +export LDOUT = -o +export RANLIB = @RANLIB@ + +export OBJEXT := .@OBJEXT@ +export LIBEXT := .@LIBEXT@ +export LIBEXT2 := @LIBEXT2@ + +export CC_OUT := @CC_OUT@ +export CC_INC := @CC_INC@ +export CC_DEF := @CC_DEF@ +export CC_OPTIMIZE := @CC_OPTIMIZE@ +export CC_LIB := -l + +export CC_SOURCES := +export CC_CFLAGS := @CC_CFLAGS@ +export CC_LDFLAGS := + diff --git a/build/cc-gcc.mak b/build/cc-gcc.mak new file mode 100644 index 0000000..a3b4807 --- /dev/null +++ b/build/cc-gcc.mak @@ -0,0 +1,22 @@ +export CC = $(CROSS_COMPILE)gcc -c +export AR = $(CROSS_COMPILE)ar rv +export LD = $(CROSS_COMPILE)gcc +export LDOUT = -o +export RANLIB = $(CROSS_COMPILE)ranlib + +export OBJEXT := .o +export LIBEXT := .a +export LIBEXT2 := + +export CC_OUT := -o +export CC_INC := -I +export CC_DEF := -D +export CC_OPTIMIZE := -O2 +export CC_LIB := -l + +export CC_SOURCES := +export CC_CFLAGS := -Wall +#export CC_CFLAGS += -Wdeclaration-after-statement +#export CC_CXXFLAGS := -Wdeclaration-after-statement +export CC_LDFLAGS := + diff --git a/build/cc-vc.mak b/build/cc-vc.mak new file mode 100644 index 0000000..187372d --- /dev/null +++ b/build/cc-vc.mak @@ -0,0 +1,20 @@ +export CC := cl /c /nologo +export AR := lib /NOLOGO /OUT: +export LD := cl /nologo +export LDOUT := /Fe +export RANLIB := echo ranlib + +export OBJEXT := .obj +export LIBEXT := .lib +export LIBEXT2 := .LIB + +export CC_OUT := /Fo +export CC_INC := /I +export CC_DEF := /D +export CC_OPTIMIZE := /Ox +export CC_LIB := + +export CC_SOURCES := +export CC_CFLAGS := /W4 /MT +export CC_CXXFLAGS := /GX +export CC_LDFLAGS := /MT diff --git a/build/common.mak b/build/common.mak new file mode 100644 index 0000000..ad6df03 --- /dev/null +++ b/build/common.mak @@ -0,0 +1,63 @@ +# +# Include host/target/compiler selection. +# This will export CC_NAME, MACHINE_NAME, OS_NAME, and HOST_NAME variables. +# +include $(PJDIR)/build.mak + +# +# Include global compiler specific definitions +# +include $(PJDIR)/build/cc-$(CC_NAME).mak + +# +# (Optionally) Include compiler specific configuration that is +# specific to this project. This configuration file is +# located in this directory. +# +-include cc-$(CC_NAME).mak + +# +# Include auto configured compiler specification. +# This will override the compiler settings above. +# Currently this is made OPTIONAL, to prevent people +# from getting errors because they don't re-run ./configure +# after downloading new PJSIP. +# +-include $(PJDIR)/build/cc-auto.mak + +# +# Include global machine specific definitions +# +include $(PJDIR)/build/m-$(MACHINE_NAME).mak +-include m-$(MACHINE_NAME).mak + +# +# Include target OS specific definitions +# +include $(PJDIR)/build/os-$(OS_NAME).mak + +# +# (Optionally) Include target OS specific configuration that is +# specific to this project. This configuration file is +# located in this directory. +# +-include os-$(OS_NAME).mak + +# +# Include host specific definitions +# +include $(PJDIR)/build/host-$(HOST_NAME).mak + +# +# (Optionally) Include host specific configuration that is +# specific to this project. This configuration file is +# located in this directory. +# +-include host-$(HOST_NAME).mak + +# +# Include global user configuration, if any +# +-include $(PJDIR)/user.mak + + diff --git a/build/host-mingw.mak b/build/host-mingw.mak new file mode 100644 index 0000000..94d03af --- /dev/null +++ b/build/host-mingw.mak @@ -0,0 +1,13 @@ +export HOST_MV := mv +export HOST_RM := rm -f @@ +export HOST_RMR := rm -rf @@ +export HOST_RMDIR := rm -rf @@ +export HOST_MKDIR := mkdir @@ +export HOST_EXE := .exe +export HOST_PSEP := / + +export HOST_SOURCES := +export HOST_CFLAGS := +export HOST_CXXFLAGS := +export HOST_LDFLAGS := $(CC_LIB)stdc++$(LIBEXT2) + diff --git a/build/host-unix.mak b/build/host-unix.mak new file mode 100644 index 0000000..0c62ac5 --- /dev/null +++ b/build/host-unix.mak @@ -0,0 +1,13 @@ +export HOST_MV := mv +export HOST_RM := rm -f @@ +export HOST_RMR := rm -rf @@ +export HOST_RMDIR := rm -rf @@ +export HOST_MKDIR := mkdir -p @@ +export HOST_EXE := $(HOST_EXE) +export HOST_PSEP := / + +export HOST_SOURCES := +export HOST_CFLAGS := +export HOST_CXXFLAGS := +export HOST_LDFLAGS := + diff --git a/build/host-win32.mak b/build/host-win32.mak new file mode 100644 index 0000000..9d0b379 --- /dev/null +++ b/build/host-win32.mak @@ -0,0 +1,12 @@ +export HOST_MV := ren +export HOST_RM := if exist @@; del /F /Q @@ +export HOST_RMR := if exist @@; del /F /Q @@ +export HOST_RMDIR := if exist @@; rmdir @@ +export HOST_MKDIR := if not exist @@; mkdir @@ +export HOST_EXE := .exe +export HOST_PSEP := \\ + +export HOST_SOURCES := +export HOST_CFLAGS := +export HOST_CXXFLAGS := +export HOST_LDFLAGS := diff --git a/build/m-alpha.mak b/build/m-alpha.mak new file mode 100644 index 0000000..f1c7502 --- /dev/null +++ b/build/m-alpha.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_ALPHA=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/m-arm.mak b/build/m-arm.mak new file mode 100644 index 0000000..43a1ef2 --- /dev/null +++ b/build/m-arm.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_ARMV4=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/m-auto.mak b/build/m-auto.mak new file mode 100644 index 0000000..3bd2ac3 --- /dev/null +++ b/build/m-auto.mak @@ -0,0 +1 @@ +# Nothing needs to be defined here diff --git a/build/m-i386.mak b/build/m-i386.mak new file mode 100644 index 0000000..1a8229d --- /dev/null +++ b/build/m-i386.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_I386=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/m-m68k.mak b/build/m-m68k.mak new file mode 100644 index 0000000..265a6ea --- /dev/null +++ b/build/m-m68k.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_M68K=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/m-mpc860.mak b/build/m-mpc860.mak new file mode 100644 index 0000000..04ff947 --- /dev/null +++ b/build/m-mpc860.mak @@ -0,0 +1,9 @@ +# +# PowerPC MPC860 specific. +# It's a PowerPC without floating point support. +# +export M_CFLAGS := $(CC_DEF)PJ_M_POWERPC=1 $(CC_DEF)PJ_HAS_FLOATING_POINT=0 -mcpu=860 +export M_CXXFLAGS := +export M_LDFLAGS := -mcpu=860 +export M_SOURCES := + diff --git a/build/m-powerpc.mak b/build/m-powerpc.mak new file mode 100644 index 0000000..6a8d448 --- /dev/null +++ b/build/m-powerpc.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_POWERPC=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/m-sparc.mak b/build/m-sparc.mak new file mode 100644 index 0000000..fa27aac --- /dev/null +++ b/build/m-sparc.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_SPARC=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/m-x86_64.mak b/build/m-x86_64.mak new file mode 100644 index 0000000..5e847e9 --- /dev/null +++ b/build/m-x86_64.mak @@ -0,0 +1,4 @@ +export M_CFLAGS := $(CC_DEF)PJ_M_X86_64=1 +export M_CXXFLAGS := +export M_LDFLAGS := +export M_SOURCES := diff --git a/build/os-auto.mak.in b/build/os-auto.mak.in new file mode 100644 index 0000000..3d99927 --- /dev/null +++ b/build/os-auto.mak.in @@ -0,0 +1,11 @@ +# @configure_input@ + +export OS_CFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CFLAGS@ + +export OS_CXXFLAGS := $(CC_DEF)PJ_AUTOCONF=1 @CXXFLAGS@ + +export OS_LDFLAGS := @LDFLAGS@ @LIBS@ + +export OS_SOURCES := + + diff --git a/build/os-darwinos.mak b/build/os-darwinos.mak new file mode 100644 index 0000000..9db31a1 --- /dev/null +++ b/build/os-darwinos.mak @@ -0,0 +1,9 @@ +export OS_CFLAGS := $(CC_DEF)PJ_DARWINOS=1 + +export OS_CXXFLAGS := + +export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) -framework CoreAudio -lm + +export OS_SOURCES := + + diff --git a/build/os-linux-kernel.mak b/build/os-linux-kernel.mak new file mode 100644 index 0000000..f559116 --- /dev/null +++ b/build/os-linux-kernel.mak @@ -0,0 +1,43 @@ + +include $(KERNEL_DIR)/.config + +# +# Basic kernel compilation flags. +# +export OS_CFLAGS := $(CC_DEF)PJ_LINUX_KERNEL=1 -D__KERNEL__ \ + -I$(KERNEL_DIR)/include -iwithprefix include \ + -nostdinc -msoft-float + +# +# Additional kernel compilation flags are taken from the kernel Makefile +# itself. +# + +KERNEL_CFLAGS := \ + $(shell cd $(KERNEL_DIR) ; \ + make script SCRIPT='@echo $$(CFLAGS) $$(CFLAGS_MODULE)' $(KERNEL_ARCH)) + +export OS_CFLAGS += $(KERNEL_CFLAGS) + +# -DMODULE -I$(KERNEL_DIR)/include -nostdinc \ +# -Wstrict-prototypes \ +# -Wno-trigraphs -fno-strict-aliasing -fno-common \ +# -msoft-float -m32 -fno-builtin-sprintf -fno-builtin-log2\ +# -fno-builtin-puts -mpreferred-stack-boundary=2 \ +# -fno-unit-at-a-time -march=i686 -mregparm=3 \ +# -iwithprefix include + +#export OS_CFLAGS += -U__i386__ -Ui386 -D__arch_um__ -DSUBARCH=\"i386\" \ +# -D_LARGEFILE64_SOURCE -I$(KERNEL_DIR)/arch/um/include \ +# -Derrno=kernel_errno \ +# -I$(KERNEL_DIR)/arch/um/kernel/tt/include \ +# -I$(KERNEL_DIR)/arch/um/kernel/skas/include \ + + +export OS_CXXFLAGS := + +export OS_LDFLAGS := + +export OS_SOURCES := + + diff --git a/build/os-linux.mak b/build/os-linux.mak new file mode 100644 index 0000000..d3783b8 --- /dev/null +++ b/build/os-linux.mak @@ -0,0 +1,9 @@ +export OS_CFLAGS := $(CC_DEF)PJ_LINUX=1 + +export OS_CXXFLAGS := + +export OS_LDFLAGS := -lportaudio-$(TARGET_NAME) -lgsmcodec-$(TARGET_NAME) -lilbccodec-$(TARGET_NAME) -lspeex-$(TARGET_NAME) -lresample-$(TARGET_NAME) $(CC_LIB)pthread$(LIBEXT2) -lm + +export OS_SOURCES := + + diff --git a/build/os-palmos.mak b/build/os-palmos.mak new file mode 100644 index 0000000..43f83bb --- /dev/null +++ b/build/os-palmos.mak @@ -0,0 +1,32 @@ +# +# make-mingw.inc: Mingw specific compilation switches. +# +PALM_OS_SDK_VER := 0x06000000 +PALM_OS_TARGET_HOST := TARGET_HOST_PALMOS +PALM_OS_TARGET_PLATFORM := TARGET_PLATFORM_PALMSIM_WIN32 +PALM_OS_BUILD_TYPE := BUILD_TYPE_DEBUG +PALM_OS_TRACE_OUTPUT := TRACE_OUTPUT_ON +PALM_OS_CPU_TYPE := CPU_ARM + +export CROSS_COMPILE := + +ifeq ($(CC_NAME),gcc) + export CFLAGS += -mno-cygwin -fexceptions -frtti +endif + +export OS_CFLAGS := $(CC_DEF)PJ_PALMOS=1 \ + $(CC_DEF)__PALMOS_KERNEL__=1 \ + $(CC_DEF)__PALMOS__=$(PALM_OS_SDK_VER) \ + $(CC_DEF)BUILD_TYPE=$(PALM_OS_BUILD_TYPE) \ + $(CC_DEF)TRACE_OUTPUT=$(PALM_OS_TRACE_OUTPUT) \ + $(CC_DEF)_SUPPORTS_NAMESPACE=0 \ + $(CC_DEF)_SUPPORTS_RTTI=0 \ + $(CC_DEF)TARGET_HOST=$(PALM_OS_TRAGET_HOST) \ + $(CC_DEF)TARGET_PLATFORM=$(PALM_OS_TARGET_PLATFORM) + +export OS_CXXFLAGS := + +export OS_LDFLAGS := + +export OS_SOURCES := + diff --git a/build/os-rtems.mak b/build/os-rtems.mak new file mode 100644 index 0000000..af99dbf --- /dev/null +++ b/build/os-rtems.mak @@ -0,0 +1,17 @@ +# +# Global OS specific configurations for RTEMS OS. +# +# Thanks Zetron, Inc and Phil Torre <ptorre@zetron.com> for donating PJLIB +# port to RTEMS. +# +export RTEMS_DEBUG := -ggdb3 -DRTEMS_DEBUG -DDEBUG -qrtems_debug + +export OS_CFLAGS := $(CC_DEF)PJ_RTEMS=1 \ + -B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems + +export OS_CXXFLAGS := + +export OS_LDFLAGS := -B$(RTEMS_LIBRARY_PATH)/lib/ -specs bsp_specs -qrtems -lm + +export OS_SOURCES := + diff --git a/build/os-sunos.mak b/build/os-sunos.mak new file mode 100644 index 0000000..608f9eb --- /dev/null +++ b/build/os-sunos.mak @@ -0,0 +1,13 @@ +export OS_CFLAGS := $(CC_DEF)PJ_SUNOS=1 + +export OS_CXXFLAGS := + +export OS_LDFLAGS := $(CC_LIB)pthread$(LIBEXT2) \ + $(CC_LIB)socket$(LIBEXT2) \ + $(CC_LIB)rt$(LIBEXT2) \ + $(CC_LIB)nsl$(LIBEXT2) \ + $(CC_LIB)m$(LIBEXT2) + +export OS_SOURCES := + + diff --git a/build/os-win32.mak b/build/os-win32.mak new file mode 100644 index 0000000..816a97f --- /dev/null +++ b/build/os-win32.mak @@ -0,0 +1,12 @@ +export OS_CFLAGS := $(CC_DEF)PJ_WIN32=1 + +export OS_CXXFLAGS := + +export OS_LDFLAGS := $(CC_LIB)wsock32$(LIBEXT2) \ + $(CC_LIB)ws2_32$(LIBEXT2)\ + $(CC_LIB)ole32$(LIBEXT2)\ + $(CC_LIB)m$(LIBEXT2) + +export OS_SOURCES := + + diff --git a/build/rules.mak b/build/rules.mak new file mode 100644 index 0000000..0d35c56 --- /dev/null +++ b/build/rules.mak @@ -0,0 +1,194 @@ +ifeq ($(LIBDIR),) +LIBDIR = ../lib +endif +ifeq ($(BINDIR),) +BINDIR = ../bin +endif + +# +# The full path of output lib file (e.g. ../lib/libapp.a). +# +LIB = $($(APP)_LIB) + +# +# The full path of output lib file (e.g. ../lib/libapp.a). +# +SHLIB = $($(APP)_SHLIB) + +# +# The full path of output executable file (e.g. ../bin/app.exe). +# +EXE = $($(APP)_EXE) + +# +# Source directory +# +SRCDIR = $($(APP)_SRCDIR) + +# +# Output directory for object files (i.e. output/target) +# +OBJDIR = output/$(app)-$(TARGET_NAME) + +ifeq ($(OS_NAME),linux-kernel) +export $(APP)_CFLAGS += -DKBUILD_MODNAME=$(app) -DKBUILD_BASENAME=$(app) +endif + + +# +# OBJS is ./output/target/file.o +# +OBJS = $(foreach file, $($(APP)_OBJS), $(OBJDIR)/$(file)) +OBJDIRS := $(sort $(dir $(OBJS))) + +# +# FULL_SRCS is ../src/app/file1.c ../src/app/file1.S +# +FULL_SRCS = $(foreach file, $($(APP)_OBJS), $(SRCDIR)/$(basename $(file)).m $(SRCDIR)/$(basename $(file)).c $(SRCDIR)/$(basename $(file)).cpp $(SRCDIR)/$(basename $(file)).S) + +# +# When generating dependency (gcc -MM), ideally we use only either +# CFLAGS or CXXFLAGS (not both). But I just couldn't make if/ifeq to work. +# +DEPFLAGS = $($(APP)_CXXFLAGS) $($(APP)_CFLAGS) + +# Dependency file +DEP_FILE := .$(app)-$(TARGET_NAME).depend + + +print_common: + @echo "###" + @echo "### DUMPING MAKE VARIABLES (I WON'T DO ANYTHING ELSE):" + @echo "###" + @echo APP=$(APP) + @echo OBJDIR=$(OBJDIR) + @echo OBJDIRS=$(OBJDIRS) + @echo OBJS=$(OBJS) + @echo SRCDIR=$(SRCDIR) + @echo FULL_SRCS=$(FULL_SRCS) + @echo $(APP)_CFLAGS=$($(APP)_CFLAGS) + @echo $(APP)_CXXFLAGS=$($(APP)_CXXFLAGS) + @echo $(APP)_LDFLAGS=$($(APP)_LDFLAGS) + @echo DEPFLAGS=$(DEPFLAGS) + @echo CC=$(CC) + @echo AR=$(AR) + @echo RANLIB=$(RANLIB) + +print_bin: print_common + @echo EXE=$(EXE) + @echo BINDIR=$(BINDIR) + +print_lib: print_common + @echo LIB=$(LIB) + @echo LIBDIR=$(LIBDIR) + +$(LIB): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) + if test ! -d $(LIBDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi + $(AR) $(LIB) $(OBJS) + $(RANLIB) $(LIB) + +$(SHLIB): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) + if test ! -d $(LIBDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)); fi + $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(SHLIB)) \ + $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS) + +$(EXE): $(OBJDIRS) $(OBJS) $($(APP)_EXTRA_DEP) + if test ! -d $(BINDIR); then $(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR)); fi + $(LD) $(LDOUT)$(subst /,$(HOST_PSEP),$(EXE)) \ + $(subst /,$(HOST_PSEP),$(OBJS)) $($(APP)_LDFLAGS) + +$(OBJDIR)/$(app).o: $(OBJDIRS) $(OBJS) + $(CROSS_COMPILE)ld -r -o $@ $(OBJS) + +$(OBJDIR)/$(app).ko: $(OBJDIR)/$(app).o + @echo Creating kbuild Makefile... + @echo "# Our module name:" > $(OBJDIR)/Makefile + @echo 'obj-m += $(app).o' >> $(OBJDIR)/Makefile + @echo >> $(OBJDIR)/Makefile + @echo "# Object members:" >> $(OBJDIR)/Makefile + @echo -n '$(app)-objs += ' >> $(OBJDIR)/Makefile + @for file in $($(APP)_OBJS); do \ + echo -n "$$file " >> $(OBJDIR)/Makefile; \ + done + @echo >> $(OBJDIR)/Makefile + @echo >> $(OBJDIR)/Makefile + @echo "# Prevent .o files to be built by kbuild:" >> $(OBJDIR)/Makefile + @for file in $($(APP)_OBJS); do \ + echo ".PHONY: `pwd`/$(OBJDIR)/$$file" >> $(OBJDIR)/Makefile; \ + done + @echo >> $(OBJDIR)/Makefile + @echo all: >> $(OBJDIR)/Makefile + @echo -e "\tmake -C $(KERNEL_DIR) M=`pwd`/$(OBJDIR) modules $(KERNEL_ARCH)" >> $(OBJDIR)/Makefile + @echo Invoking kbuild... + make -C $(OBJDIR) + +../lib/$(app).ko: $(LIB) $(OBJDIR)/$(app).ko + cp $(OBJDIR)/$(app).ko ../lib + +$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.m + $(CC) $($(APP)_CFLAGS) \ + $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ + $(subst /,$(HOST_PSEP),$<) + +$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.c + $(CC) $($(APP)_CFLAGS) \ + $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ + $(subst /,$(HOST_PSEP),$<) + +$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.S + $(CC) $($(APP)_CFLAGS) \ + $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ + $(subst /,$(HOST_PSEP),$<) + +$(OBJDIR)/%$(OBJEXT): $(SRCDIR)/%.cpp + $(CC) $($(APP)_CXXFLAGS) \ + $(CC_OUT)$(subst /,$(HOST_PSEP),$@) \ + $(subst /,$(HOST_PSEP),$<) + +$(OBJDIRS): + $(subst @@,$(subst /,$(HOST_PSEP),$@),$(HOST_MKDIR)) + +$(LIBDIR): + $(subst @@,$(subst /,$(HOST_PSEP),$(LIBDIR)),$(HOST_MKDIR)) + +$(BINDIR): + $(subst @@,$(subst /,$(HOST_PSEP),$(BINDIR)),$(HOST_MKDIR)) + +clean: + $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)/*),$(HOST_RMR)) + $(subst @@,$(subst /,$(HOST_PSEP),$(OBJDIR)),$(HOST_RMDIR)) +ifeq ($(OS_NAME),linux-kernel) + rm -f ../lib/$(app).o +endif + +gcov-report: + for file in $(FULL_SRCS); do \ + gcov $$file -n -o $(OBJDIR); \ + done + +realclean: clean + $(subst @@,$(subst /,$(HOST_PSEP),$(LIB)) $(subst /,$(HOST_PSEP),$(EXE)),$(HOST_RM)) + $(subst @@,$(DEP_FILE),$(HOST_RM)) +ifeq ($(OS_NAME),linux-kernel) + rm -f ../lib/$(app).ko +endif + +depend: + $(subst @@,$(DEP_FILE),$(HOST_RM)) + for F in $(FULL_SRCS); do \ + if test -f $$F; then \ + echo "$(OBJDIR)/" | tr -d '\n' >> $(DEP_FILE); \ + if $(CC) -M $(DEPFLAGS) $$F | sed '/^#/d' >> $(DEP_FILE); then \ + true; \ + else \ + echo 'err:' >> $(DEP_FILE); \ + rm -f $(DEP_FILE); \ + exit 1; \ + fi; \ + fi; \ + done; + +dep: depend + +-include $(DEP_FILE) + diff --git a/build/vs/pjproject-vs8-common-defaults.vsprops b/build/vs/pjproject-vs8-common-defaults.vsprops new file mode 100644 index 0000000..da21efc --- /dev/null +++ b/build/vs/pjproject-vs8-common-defaults.vsprops @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-common-defaults"
+ OutputDirectory=".\output\$(ProjectName)-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName)"
+ IntermediateDirectory="$(OutDir)"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ BrowseInformation="1"
+ WarningLevel="4"
+ CompileAs="0"
+ />
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\lib\$(ProjectName)-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).lib"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="..\bin\$(ProjectName)-$(TargetCPU)-$(PlatformName)-vc$(VSVer)-$(ConfigurationName).exe"
+ />
+ <UserMacro
+ Name="VSVer"
+ Value="8"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-debug-defaults.vsprops b/build/vs/pjproject-vs8-debug-defaults.vsprops new file mode 100644 index 0000000..0049dfa --- /dev/null +++ b/build/vs/pjproject-vs8-debug-defaults.vsprops @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-debug-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-common-defaults.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ PreprocessorDefinitions="_DEBUG;DEBUG"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-debug-dynamic-defaults.vsprops b/build/vs/pjproject-vs8-debug-dynamic-defaults.vsprops new file mode 100644 index 0000000..9060357 --- /dev/null +++ b/build/vs/pjproject-vs8-debug-dynamic-defaults.vsprops @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-debug-dynamic-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-debug-defaults.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ RuntimeLibrary="3"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-debug-static-defaults.vsprops b/build/vs/pjproject-vs8-debug-static-defaults.vsprops new file mode 100644 index 0000000..b175761 --- /dev/null +++ b/build/vs/pjproject-vs8-debug-static-defaults.vsprops @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-debug-static-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-debug-defaults.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ RuntimeLibrary="1"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-release-defaults.vsprops b/build/vs/pjproject-vs8-release-defaults.vsprops new file mode 100644 index 0000000..2053154 --- /dev/null +++ b/build/vs/pjproject-vs8-release-defaults.vsprops @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-release-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-common-defaults.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ PreprocessorDefinitions="NDEBUG"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-release-dynamic-defaults.vsprops b/build/vs/pjproject-vs8-release-dynamic-defaults.vsprops new file mode 100644 index 0000000..bdafe61 --- /dev/null +++ b/build/vs/pjproject-vs8-release-dynamic-defaults.vsprops @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-release-dynamic-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-release-defaults.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ RuntimeLibrary="2"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-release-static-defaults.vsprops b/build/vs/pjproject-vs8-release-static-defaults.vsprops new file mode 100644 index 0000000..06a77f5 --- /dev/null +++ b/build/vs/pjproject-vs8-release-static-defaults.vsprops @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-release-static-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-release-defaults.vsprops"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ RuntimeLibrary="0"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-win32-common-defaults.vsprops b/build/vs/pjproject-vs8-win32-common-defaults.vsprops new file mode 100644 index 0000000..58e42a1 --- /dev/null +++ b/build/vs/pjproject-vs8-win32-common-defaults.vsprops @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-win32-common-defaults"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="WIN32;PJ_WIN32=1;PJ_M_I386=1;"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ SubSystem="1"
+ TargetMachine="1"
+ />
+ <UserMacro
+ Name="TargetCPU"
+ Value="i386"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-win32-release-defaults.vsprops b/build/vs/pjproject-vs8-win32-release-defaults.vsprops new file mode 100644 index 0000000..33fdc50 --- /dev/null +++ b/build/vs/pjproject-vs8-win32-release-defaults.vsprops @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-win32-release-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-win32-common-defaults.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-wm2003-common-defaults.vsprops b/build/vs/pjproject-vs8-wm2003-common-defaults.vsprops new file mode 100644 index 0000000..639c0be --- /dev/null +++ b/build/vs/pjproject-vs8-wm2003-common-defaults.vsprops @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-wm2003-common-defaults"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;$(ARCHFAM);$(_ARCHFAM_)"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4214;4201"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="secchk.lib ccrtrtti.lib"
+ SubSystem="9"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ TargetMachine="3"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;$(ARCHFAM);$(_ARCHFAM_)"
+ />
+ <UserMacro
+ Name="TargetCPU"
+ Value="armv4"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-wm2003-release-defaults.vsprops b/build/vs/pjproject-vs8-wm2003-release-defaults.vsprops new file mode 100644 index 0000000..7efe467 --- /dev/null +++ b/build/vs/pjproject-vs8-wm2003-release-defaults.vsprops @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-wm2003-release-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-wm2003-common-defaults.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-wm5-common-defaults.vsprops b/build/vs/pjproject-vs8-wm5-common-defaults.vsprops new file mode 100644 index 0000000..7ef5b5d --- /dev/null +++ b/build/vs/pjproject-vs8-wm5-common-defaults.vsprops @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-wm5-common-defaults"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;$(ARCHFAM);$(_ARCHFAM_)"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4214;4201"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ SubSystem="9"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;$(ARCHFAM);$(_ARCHFAM_)"
+ />
+ <UserMacro
+ Name="TargetCPU"
+ Value="armv4i"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-wm5-release-defaults.vsprops b/build/vs/pjproject-vs8-wm5-release-defaults.vsprops new file mode 100644 index 0000000..2ba243b --- /dev/null +++ b/build/vs/pjproject-vs8-wm5-release-defaults.vsprops @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-wm5-release-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-wm5-common-defaults.vsprops"
+ >
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-wm6-common-defaults.vsprops b/build/vs/pjproject-vs8-wm6-common-defaults.vsprops new file mode 100644 index 0000000..54733f5 --- /dev/null +++ b/build/vs/pjproject-vs8-wm6-common-defaults.vsprops @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-wm6-common-defaults"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;$(ARCHFAM);$(_ARCHFAM_)"
+ DebugInformationFormat="3"
+ DisableSpecificWarnings="4214;4201"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ SubSystem="9"
+ StackReserveSize="65536"
+ StackCommitSize="4096"
+ EntryPointSymbol="WinMainCRTStartup"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;$(ARCHFAM);$(_ARCHFAM_)"
+ />
+ <UserMacro
+ Name="TargetCPU"
+ Value="armv4i"
+ />
+</VisualStudioPropertySheet>
diff --git a/build/vs/pjproject-vs8-wm6-release-defaults.vsprops b/build/vs/pjproject-vs8-wm6-release-defaults.vsprops new file mode 100644 index 0000000..b2c0e1a --- /dev/null +++ b/build/vs/pjproject-vs8-wm6-release-defaults.vsprops @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+ ProjectType="Visual C++"
+ Version="8.00"
+ Name="pjproject-vs8-wm6-release-defaults"
+ InheritedPropertySheets=".\pjproject-vs8-wm6-common-defaults.vsprops"
+ >
+</VisualStudioPropertySheet>
|