Small code reorganizations.
authorethereal <>
Tue, 23 Jun 2015 06:27:51 +0000 (06:27 +0000)
committerethereal <>
Tue, 23 Jun 2015 06:27:51 +0000 (06:27 +0000)
src/vmath.c [moved from src/ecore/math.c with 99% similarity]
src/vmath.h [moved from src/ecore/math.h with 95% similarity]

index 821aab7..7c36ec7 100644 (file)
@@ -9,11 +9,11 @@ if(${build_ecore})
     add_custom_command(OUTPUT ecore.o DEPENDS ${base}/ecore.c COMMAND e-gcc -Wall -Wextra -std=c99 ${base}/ecore.c -c -o ecore.o -ffreestanding -nostdlib)
     add_custom_command(OUTPUT rreq.o DEPENDS ${base}/rreq.c COMMAND e-gcc -Wall -Wextra -std=c99 ${base}/rreq.c -c -o rreq.o -ffreestanding -nostdlib)
     add_custom_command(OUTPUT render.o DEPENDS ${base}/render.c COMMAND e-gcc -Wall -Wextra -std=c99 ${base}/render.c -c -o render.o -ffreestanding -nostdlib -Os)
-    add_custom_command(OUTPUT math.o DEPENDS ${base}/math.c COMMAND e-gcc -Wall -Wextra -std=c99 ${base}/math.c -c -o math.o -ffreestanding -nostdlib -Os)
+    add_custom_command(OUTPUT vmath.o DEPENDS ${base}/../vmath.c COMMAND e-gcc -Wall -Wextra -std=c99 ${base}/../vmath.c -c -o vmath.o -ffreestanding -nostdlib -Os)
     add_custom_command(OUTPUT lmath.o DEPENDS ${base}/lmath.c COMMAND e-gcc -Wall -Wextra -std=c99 ${base}/lmath.c -c -o lmath.o -ffreestanding -nostdlib -Os)
     add_custom_command(OUTPUT support.o DEPENDS ${base}/support.S COMMAND e-as ${base}/support.S -o support.o)
-    add_custom_command(OUTPUT ecore.elf DEPENDS ecore.o rreq.o render.o math.o lmath.o support.o COMMAND e-ld ecore.o rreq.o render.o math.o lmath.o support.o -o ecore.elf -le-lib -lgcc -T$ENV{EPIPHANY_HOME}/bsps/current/internal.ldf -L$ENV{EPIPHANY_HOME}/tools/e-gnu/epiphany-elf/lib/ -L$ENV{EPIPHANY_HOME}/tools/e-gnu/lib/gcc/epiphany-elf/4.8.2/)
+    add_custom_command(OUTPUT ecore.elf DEPENDS ecore.o rreq.o render.o vmath.o lmath.o support.o COMMAND e-ld ecore.o rreq.o render.o vmath.o lmath.o support.o -o ecore.elf -le-lib -lgcc -T$ENV{EPIPHANY_HOME}/bsps/current/internal.ldf -L$ENV{EPIPHANY_HOME}/tools/e-gnu/epiphany-elf/lib/ -L$ENV{EPIPHANY_HOME}/tools/e-gnu/lib/gcc/epiphany-elf/4.8.2/)
     add_custom_command(OUTPUT ecore.srec DEPENDS ecore.elf COMMAND e-objcopy --srec-forceS3 --output-target srec ecore.elf ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ecore.srec)
     add_custom_target(ecore ALL DEPENDS ecore.srec)
similarity index 99%
rename from src/ecore/math.c
rename to src/vmath.c
index 259c61d..039838e 100644 (file)
@@ -1,6 +1,6 @@
 #include <math.h>
-#include "math.h"
+#include "vmath.h"
 void set_vector(vector_t *v, float x, float y, float z, float w) {
     v->c[0] = x;
similarity index 95%
rename from src/ecore/math.h
rename to src/vmath.h
index c169e57..43d8e17 100644 (file)
@@ -1,8 +1,7 @@
-#ifndef MATH_H
-#define MATH_H
+#ifndef VMATH_H
+#define VMATH_H
 #include <math.h>
-#include "lmath.h"
 /* Four-dimensional affine vector/point. */
 typedef struct vector_t vector_t;