bin = erebus
-incdir = -I../liberebus/include
+incdir = -I../liberebus/src
libdir = -L../liberebus
CFLAGS = -pedantic -Wall $(opt_dbg) $(opt_opt) $(incdir)
name = erebus
alib = lib$(name).a
-incdir = -Iinclude
-
-CFLAGS = -pedantic -Wall $(opt_dbg) $(opt_opt) $(incdir)
+CFLAGS = -pedantic -Wall $(opt_dbg) $(opt_opt)
LDFLAGS = -lm
$(alib): $(obj)
install: $(alib)
mkdir -p $(DESTDIR)$(PREFIX)/include/erebus $(DESTDIR)$(PREFIX)/lib
cp $(alib) $(DESTDIR)$(PREFIX)/lib/$(alib)
- cp include/*.h $(DESTDIR)$(PREFIX)/include/erebus/
+ cp src/erebus.h $(DESTDIR)$(PREFIX)/include/erebus.h
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/lib/$(alib)
- rm -f $(DESTDIR)$(PREFIX)/include/erebus/*.h
- rmdir $(DESTDIR)$(PREFIX)/include/erebus
+ rm -f $(DESTDIR)$(PREFIX)/include/erebus.h
+++ /dev/null
-#ifndef RENDLIB_H_
-#define RENDLIB_H_
-
-#include <cgmath/cgmath.h>
-
-struct erb_node;
-struct erb_surf;
-struct erb_ray;
-struct erb_hit;
-
-typedef int (*erb_intersect_func)(struct erb_surf *surf, struct erb_ray *ray, struct erb_hit *hit);
-typedef void (*erb_sample_func)(struct erb_surf *surf, cgm_vec3 *pos);
-
-struct erb_node {
- struct erb_node *par; /* parent node */
- struct erb_node *clist; /* child nodes */
- struct erb_surf *surflist; /* surfaces in this node */
- float xform[16], inv_xform[16]; /* global transformation */
- float node_xform[16], inv_node_xform[16]; /* local transformation */
-};
-
-struct erb_surf {
- struct erb_node *node; /* transformation node for this surface */
-
- erb_intersect_func isect; /* intersection routine */
- erb_sample_func sample; /* random sample generation */
-};
-
-struct erb_ray {
- cgm_vec3 o, d; /* origin and direction */
- float tmin, tmax; /* segment bounds */
- float ior; /* IOR of the medium through which this ray travels */
- float total_dist; /* travel distance accumulator */
-};
-
-struct erb_hit {
- float t, err;
- struct erb_surf *surf;
-};
-
-int erb_init(void);
-void erb_cleanup(void);
-
-#endif /* RENDLIB_H_ */
--- /dev/null
+#ifndef RENDLIB_H_
+#define RENDLIB_H_
+
+#include <cgmath/cgmath.h>
+
+struct erb_node;
+struct erb_surf;
+struct erb_ray;
+struct erb_hit;
+
+typedef int (*erb_intersect_func)(struct erb_surf *surf, struct erb_ray *ray, struct erb_hit *hit);
+typedef void (*erb_sample_func)(struct erb_surf *surf, cgm_vec3 *pos);
+
+struct erb_node {
+ struct erb_node *par; /* parent node */
+ struct erb_node *clist; /* child nodes */
+ struct erb_surf *surflist; /* surfaces in this node */
+ float xform[16], inv_xform[16]; /* global transformation */
+ float node_xform[16], inv_node_xform[16]; /* local transformation */
+};
+
+struct erb_surf {
+ struct erb_node *node; /* transformation node for this surface */
+
+ erb_intersect_func isect; /* intersection routine */
+ erb_sample_func sample; /* random sample generation */
+};
+
+struct erb_ray {
+ cgm_vec3 o, d; /* origin and direction */
+ float tmin, tmax; /* segment bounds */
+ float ior; /* IOR of the medium through which this ray travels */
+ float total_dist; /* travel distance accumulator */
+};
+
+struct erb_hit {
+ float t, err;
+ struct erb_surf *surf;
+};
+
+int erb_init(void);
+void erb_cleanup(void);
+
+#endif /* RENDLIB_H_ */
bin = xerebus
def = -DMINIGLUT_USE_LIBC
-incdir = -I../liberebus/include
+incdir = -I../liberebus/src
libdir = -L../liberebus
CFLAGS = -pedantic -Wall $(opt_dbg) $(opt_opt) $(def) $(incdir)