Browse files

Reworked makefiles to work for cross compiling pasm and pru lib

  • Loading branch information...
1 parent c694dd1 commit c48b1e66e1c186f775fee353a28ec63440575ef4 @osresearch committed Jul 31, 2013
Showing with 38 additions and 16 deletions.
  1. +10 −4 Makefile
  2. +1 −1 am335x/app_loader/interface/Makefile
  3. +27 −0 am335x/pasm/Makefile
  4. +0 −3 am335x/pasm/dosbuild.bat
  5. +0 −4 am335x/pasm/linuxbuild
  6. +0 −4 am335x/pasm/macbuild
View
14 Makefile
@@ -1,7 +1,7 @@
-#CROSS_COMPILE?=arm-arago-linux-gnueabi-
+CROSS_COMPILE?=arm-linux-gnueabi-
-LIBDIR_APP_LOADER?=../../app_loader/lib
-INCDIR_APP_LOADER?=../../app_loader/include
+LIBDIR_APP_LOADER?=./am335x/app_loader/lib
+INCDIR_APP_LOADER?=./am335x/app_loader/include
CFLAGS += \
-std=c99 \
@@ -17,7 +17,7 @@ LDFLAGS += \
-lprussdrv \
-lpthread \
-PASM := ../../utils/pasm_2
+PASM := ./am335x/pasm/pasm
TARGET := rgb-test
_DEPS =
@@ -51,3 +51,9 @@ dts: LEDscape.dts
fi
dtc -O dtb -o /lib/firmware/BB-LEDSCAPE-00A0.dtbo -b 0 -@ LEDscape.dts
echo BB-LEDSCAPE > $(SLOT_FILE)
+
+
+# Libraries and compiler
+depend:
+ $(MAKE) -C am335x/app_loader/interface
+ cd ./am335x/pasm ; ./linuxbuild
View
2 am335x/app_loader/interface/Makefile
@@ -1,6 +1,6 @@
ROOTDIR = ..
TARGET = libprussdrv
-CROSS_COMPILE?=arm-arago-linux-gnueabi-
+CROSS_COMPILE?=arm-linux-gnueabi-
CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
View
27 am335x/pasm/Makefile
@@ -0,0 +1,27 @@
+# Builds with whatever the host format is
+CC := gcc
+
+CFLAGS += \
+ -O3 \
+ -W \
+ -Wall \
+ -D_UNIX_ \
+
+OBJS := \
+ pasm.o \
+ pasmpp.o \
+ pasmexp.o \
+ pasmop.o \
+ pasmdot.o \
+ pasmstruct.o \
+ pasmmacro.o \
+
+all: pasm
+
+pasm: $(OBJS)
+ $(CC) -o $@ $^
+
+clean:
+ $(RM) -f *.o
+
+
View
3 am335x/pasm/dosbuild.bat
@@ -1,3 +0,0 @@
-cl -W3 -D_CRT_SECURE_NO_WARNINGS pasm.c pasmpp.c pasmexp.c pasmop.c pasmdot.c pasmstruct.c pasmmacro.c /Fe..\pasm.exe
-del *.obj
-
View
4 am335x/pasm/linuxbuild
@@ -1,4 +0,0 @@
-#!/bin/sh
-gcc -Wall -D_UNIX_ pasm.c pasmpp.c pasmexp.c pasmop.c pasmdot.c pasmstruct.c pasmmacro.c -o ../pasm
-
-
View
4 am335x/pasm/macbuild
@@ -1,4 +0,0 @@
-#!/bin/sh
-gcc -Wall -D_UNIX_ pasm.c pasmpp.c pasmexp.c pasmop.c pasmdot.c pasmstruct.c pasmmacro.c -o ../pasm.mac
-
-

0 comments on commit c48b1e6

Please sign in to comment.