Added linux makefiles for Linux test project
authorJustin Sobota <jsobota@ti.com>
Fri, 26 Apr 2013 22:37:31 +0000 (18:37 -0400)
committerJustin Sobota <jsobota@ti.com>
Fri, 26 Apr 2013 22:37:31 +0000 (18:37 -0400)
.gitignore
test/k2h/armv7/linux/build/makefile [new file with mode: 0644]
test/k2k/armv7/linux/build/makefile [new file with mode: 0644]

index 25bc799768174da99508a619c409fe559180a585..a345882496b1978f06293f641dd25611df743d52 100644 (file)
@@ -14,7 +14,6 @@ docs/Doxyfile
 docs/doxygen/
 docs/rmDocs.chm
 lib/
-makefile
 package.mak
 package/
 packages/
diff --git a/test/k2h/armv7/linux/build/makefile b/test/k2h/armv7/linux/build/makefile
new file mode 100644 (file)
index 0000000..20c5b49
--- /dev/null
@@ -0,0 +1,97 @@
+#
+# Macro definitions referenced below
+#
+
+empty =
+space =$(empty) $(empty)
+
+PDK_INSTALL_PATH ?= ../../..
+
+ARMV7OBJDIR ?= ./obj/$(DEVICE)
+ARMV7BINDIR ?= ./bin/$(DEVICE)
+ARMV7LIBDIR ?= ./lib
+
+ARMV7OBJDIR := $(ARMV7OBJDIR)/rm/test
+ARMV7BINDIR := $(ARMV7BINDIR)/rm/test
+
+#Cross tools
+ifdef CROSS_TOOL_INSTALL_PATH
+# Support backwards compatibility with KeyStone1 approach
+ CC = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)gcc
+ AC = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)as
+ AR = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)ar
+ LD = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)gcc
+endif
+
+# INCLUDE Directories
+RM_INC_DIR = $(PDK_INSTALL_PATH)/ti/drv/rm
+
+RM_SRC_DIR ?= $(PDK_INSTALL_PATH)/ti/drv/rm
+RM_TEST_DIR = $(RM_SRC_DIR)/test
+RM_ARM_LIN_TEST_DIR = $(RM_TEST_DIR)/$(DEVICE)/armv7/linux
+
+INCDIR := $(PDK_INSTALL_PATH);$(RM_INC_DIR);$(RM_ARM_LIN_TEST_DIR)
+
+# Libraries
+RM_LIB = -lrm
+
+# Compiler options
+INTERNALDEFS = $(DEBUG_FLAG) -D__ARMv7 -DDEVICE_K2H -D_VIRTUAL_ADDR_SUPPORT -D__LINUX_USER_SPACE -D_LITTLE_ENDIAN=1 -DMAKEFILE_BUILD
+
+# Linker options
+INTERNALLINKDEFS = --start-group -L $(ARMV7LIBDIR) $(RM_LIB) -lrt --end-group -pthread $(LDFLAGS)
+
+RM_SERVER_EXE=rmServer.out
+RM_CLIENT_TEST_EXE=rmClientTest.out
+
+OBJEXT = o 
+
+SRCDIR = $(RM_ARM_LIN_TEST_DIR)
+
+INCS = -I. -I$(strip $(subst ;, -I,$(INCDIR)))
+
+VPATH=$(SRCDIR)
+
+#List the Source Files
+RM_SERVER_SRC =     \
+    rm_server.c     \
+    rm_linux_osal.c \
+    sockutils.c
+    
+RM_CLIENT_TEST_SRC = \
+    rm_client_test.c \
+    rm_linux_osal.c  \
+    sockutils.c
+
+# FLAGS for the SourceFiles
+SRC_CFLAGS = -I. $(CFLAGS)
+
+# Make Rule for the SRC Files
+RM_SERVER_SRC_OBJS = $(patsubst %.c, $(ARMV7OBJDIR)/%.$(OBJEXT), $(RM_SERVER_SRC))
+RM_CLIENT_TEST_SRC_OBJS = $(patsubst %.c, $(ARMV7OBJDIR)/%.$(OBJEXT), $(RM_CLIENT_TEST_SRC))
+
+all:$(ARMV7BINDIR)/$(RM_SERVER_EXE) $(ARMV7BINDIR)/$(RM_CLIENT_TEST_EXE)
+
+$(ARMV7BINDIR)/$(RM_SERVER_EXE): $(RM_SERVER_SRC_OBJS) $(ARMV7BINDIR)/.created
+       @echo linking $(RM_SERVER_SRC_OBJS) into $@ ...
+       @$(CC) $(RM_SERVER_SRC_OBJS) $(INTERNALLINKDEFS) -o $@
+$(ARMV7BINDIR)/$(RM_CLIENT_TEST_EXE): $(RM_CLIENT_TEST_SRC_OBJS) $(ARMV7BINDIR)/.created
+       @echo linking $(RM_CLIENT_TEST_SRC_OBJS) into $@ ...
+       @$(CC) $(RM_CLIENT_TEST_SRC_OBJS) $(INTERNALLINKDEFS) -o $@
+
+$(ARMV7OBJDIR)/%.$(OBJEXT): %.c $(ARMV7OBJDIR)/.created
+       @echo compiling $< ...
+       @$(CC) -c $(SRC_CFLAGS) $(INTERNALDEFS) $(INCS)  $< -o $@
+
+$(ARMV7OBJDIR)/.created:
+       @mkdir -p $(ARMV7OBJDIR)
+       @touch $(ARMV7OBJDIR)/.created
+
+$(ARMV7BINDIR)/.created:
+       @mkdir -p $(ARMV7BINDIR)
+       @touch $(ARMV7BINDIR)/.created
+
+clean:
+       @rm -fr $(ARMV7OBJDIR)
+       @rm -fr $(ARMV7BINDIR)
+
diff --git a/test/k2k/armv7/linux/build/makefile b/test/k2k/armv7/linux/build/makefile
new file mode 100644 (file)
index 0000000..32c163e
--- /dev/null
@@ -0,0 +1,97 @@
+#
+# Macro definitions referenced below
+#
+
+empty =
+space =$(empty) $(empty)
+
+PDK_INSTALL_PATH ?= ../../..
+
+ARMV7OBJDIR ?= ./obj/$(DEVICE)
+ARMV7BINDIR ?= ./bin/$(DEVICE)
+ARMV7LIBDIR ?= ./lib
+
+ARMV7OBJDIR := $(ARMV7OBJDIR)/rm/test
+ARMV7BINDIR := $(ARMV7BINDIR)/rm/test
+
+#Cross tools
+ifdef CROSS_TOOL_INSTALL_PATH
+# Support backwards compatibility with KeyStone1 approach
+ CC = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)gcc
+ AC = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)as
+ AR = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)ar
+ LD = $(CROSS_TOOL_INSTALL_PATH)/$(CROSS_TOOL_PRFX)gcc
+endif
+
+# INCLUDE Directories
+RM_INC_DIR = $(PDK_INSTALL_PATH)/ti/drv/rm
+
+RM_SRC_DIR ?= $(PDK_INSTALL_PATH)/ti/drv/rm
+RM_TEST_DIR = $(RM_SRC_DIR)/test
+RM_ARM_LIN_TEST_DIR = $(RM_TEST_DIR)/$(DEVICE)/armv7/linux
+
+INCDIR := $(PDK_INSTALL_PATH);$(RM_INC_DIR);$(RM_ARM_LIN_TEST_DIR)
+
+# Libraries
+RM_LIB = -lrm
+
+# Compiler options
+INTERNALDEFS = $(DEBUG_FLAG) -D__ARMv7 -DDEVICE_K2K -D_VIRTUAL_ADDR_SUPPORT -D__LINUX_USER_SPACE -D_LITTLE_ENDIAN=1 -DMAKEFILE_BUILD
+
+# Linker options
+INTERNALLINKDEFS = --start-group -L $(ARMV7LIBDIR) $(RM_LIB) -lrt --end-group -pthread $(LDFLAGS)
+
+RM_SERVER_EXE=rmServer.out
+RM_CLIENT_TEST_EXE=rmClientTest.out
+
+OBJEXT = o 
+
+SRCDIR = $(RM_ARM_LIN_TEST_DIR)
+
+INCS = -I. -I$(strip $(subst ;, -I,$(INCDIR)))
+
+VPATH=$(SRCDIR)
+
+#List the Source Files
+RM_SERVER_SRC =     \
+    rm_server.c     \
+    rm_linux_osal.c \
+    sockutils.c
+    
+RM_CLIENT_TEST_SRC = \
+    rm_client_test.c \
+    rm_linux_osal.c  \
+    sockutils.c
+
+# FLAGS for the SourceFiles
+SRC_CFLAGS = -I. $(CFLAGS)
+
+# Make Rule for the SRC Files
+RM_SERVER_SRC_OBJS = $(patsubst %.c, $(ARMV7OBJDIR)/%.$(OBJEXT), $(RM_SERVER_SRC))
+RM_CLIENT_TEST_SRC_OBJS = $(patsubst %.c, $(ARMV7OBJDIR)/%.$(OBJEXT), $(RM_CLIENT_TEST_SRC))
+
+all:$(ARMV7BINDIR)/$(RM_SERVER_EXE) $(ARMV7BINDIR)/$(RM_CLIENT_TEST_EXE)
+
+$(ARMV7BINDIR)/$(RM_SERVER_EXE): $(RM_SERVER_SRC_OBJS) $(ARMV7BINDIR)/.created
+       @echo linking $(RM_SERVER_SRC_OBJS) into $@ ...
+       @$(CC) $(RM_SERVER_SRC_OBJS) $(INTERNALLINKDEFS) -o $@
+$(ARMV7BINDIR)/$(RM_CLIENT_TEST_EXE): $(RM_CLIENT_TEST_SRC_OBJS) $(ARMV7BINDIR)/.created
+       @echo linking $(RM_CLIENT_TEST_SRC_OBJS) into $@ ...
+       @$(CC) $(RM_CLIENT_TEST_SRC_OBJS) $(INTERNALLINKDEFS) -o $@
+
+$(ARMV7OBJDIR)/%.$(OBJEXT): %.c $(ARMV7OBJDIR)/.created
+       @echo compiling $< ...
+       @$(CC) -c $(SRC_CFLAGS) $(INTERNALDEFS) $(INCS)  $< -o $@
+
+$(ARMV7OBJDIR)/.created:
+       @mkdir -p $(ARMV7OBJDIR)
+       @touch $(ARMV7OBJDIR)/.created
+
+$(ARMV7BINDIR)/.created:
+       @mkdir -p $(ARMV7BINDIR)
+       @touch $(ARMV7BINDIR)/.created
+
+clean:
+       @rm -fr $(ARMV7OBJDIR)
+       @rm -fr $(ARMV7BINDIR)
+