organized project directory. makefile broken
This commit is contained in:
1 parent
1fce028eea
commit
f09db214cc
20 files changed
+32
-63
No files matched your search
@@ -7,27 +7,27 @@ ifeq ($(LDFLAGS),)
|
||||
LDFLAGS := -lwayland-client -lm
|
||||
endif
|
||||
|
||||
LIB_SRC := waymini.c xdg-shell-client-protocol.c
|
||||
LIB_SRC := waymini/waymini.c waymini/xdg-shell-client-protocol.c
|
||||
LIB_OBJ := $(LIB_SRC:.c=.o)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: libwaymini.a example waymini
|
||||
all: waymini/libwaymini.a example waymini
|
||||
|
||||
libwaymini.a: $(LIB_OBJ)
|
||||
ar rcs $@ $^
|
||||
waymini/libwaymini.a: $(LIB_OBJ)
|
||||
ar rcs -rpath=./waymini $@ $^
|
||||
|
||||
example: example.cpp libwaymini.a
|
||||
example: example.cpp waymini/libwaymini.a
|
||||
g++ $(CFLAGS) -o $@ example.cpp -L. -lwaymini $(LDFLAGS)
|
||||
|
||||
waymini: waymini_standalone.c waymini.c xdg-shell-client-protocol.c
|
||||
$(CC) $(CFLAGS) -o $@ waymini_standalone.c waymini.c xdg-shell-client-protocol.c $(LDFLAGS)
|
||||
waymini: waymini/waymini_standalone.c waymini/waymini.c waymini/xdg-shell-client-protocol.c
|
||||
$(CC) $(CFLAGS) -o $@ waymini/waymini_standalone.c waymini/waymini.c waymini/xdg-shell-client-protocol.c $(LDFLAGS)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f $(LIB_OBJ) libwaymini.a example waymini
|
||||
rm -f $(LIB_OBJ) waymini/libwaymini.a example waymini/waymini
|
||||
|
||||
xdg-shell-client-protocol.c xdg-shell-client-protocol.h: gen-protocols.sh
|
||||
bash gen-protocols.sh
|
||||
bash waymini/gen-protocols.sh
|
||||
@@ -1,31 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace UwU {
|
||||
|
||||
class Bresenham {
|
||||
private:
|
||||
int16_t x0;
|
||||
int16_t y0;
|
||||
int16_t x1;
|
||||
int16_t y1;
|
||||
int16_t d;
|
||||
int16_t
|
||||
|
||||
public:
|
||||
Bresenham(int16_t x0, int16_t y0, int16_t x1, int16_t y1) {
|
||||
this->x0 = x0;
|
||||
this->y0 = y0;
|
||||
this->x1 = x1;
|
||||
this->y1 = y1;
|
||||
|
||||
if (abs(y1 - y0) < abs(x1 - x0)) {
|
||||
if (x0 > x1) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
// #pragma once
|
||||
|
||||
#include "waymini.h"
|
||||
#include "waymini/waymini.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
#include "datatypes.cpp"
|
||||
#include "helpers.cpp"
|
||||
#include "triangle.cpp"
|
||||
#include "buffer.cpp"
|
||||
#include "surface.cpp"
|
||||
#include "trapezoid.cpp"
|
||||
#include "line.cpp"
|
||||
#include "rectangle.cpp"
|
||||
#include "point.cpp"
|
||||
#include "primatives/line.cpp"
|
||||
#include "primatives/point.cpp"
|
||||
#include "primatives/rectangle.cpp"
|
||||
#include "primatives/trapezoid.cpp"
|
||||
#include "primatives/triangle.cpp"
|
||||
// #include "draw.cpp"
|
||||
#include "shaders/shader.cpp"
|
||||
|
||||
|
||||
Binary file not shown.
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "datatypes.cpp"
|
||||
#include "helpers.cpp"
|
||||
#include "buffer.cpp"
|
||||
#include "../datatypes.cpp"
|
||||
#include "../helpers.cpp"
|
||||
#include "../buffer.cpp"
|
||||
|
||||
namespace UwU {
|
||||
// line
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "datatypes.cpp"
|
||||
#include "helpers.cpp"
|
||||
#include "buffer.cpp"
|
||||
#include "../datatypes.cpp"
|
||||
#include "../helpers.cpp"
|
||||
#include "../buffer.cpp"
|
||||
|
||||
namespace UwU {
|
||||
// point
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "datatypes.cpp"
|
||||
#include "helpers.cpp"
|
||||
#include "buffer.cpp"
|
||||
#include "shaders/shader.cpp"
|
||||
#include "../datatypes.cpp"
|
||||
#include "../helpers.cpp"
|
||||
#include "../buffer.cpp"
|
||||
#include "../shaders/shader.cpp"
|
||||
|
||||
namespace UwU {
|
||||
// rectangle
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "datatypes.cpp"
|
||||
#include "helpers.cpp"
|
||||
#include "buffer.cpp"
|
||||
#include "../datatypes.cpp"
|
||||
#include "../helpers.cpp"
|
||||
#include "../buffer.cpp"
|
||||
|
||||
namespace UwU {
|
||||
// trapezoid (horizontally constrained)
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "datatypes.cpp"
|
||||
#include "helpers.cpp"
|
||||
#include "buffer.cpp"
|
||||
#include "../datatypes.cpp"
|
||||
#include "../helpers.cpp"
|
||||
#include "../buffer.cpp"
|
||||
|
||||
namespace UwU {
|
||||
class Triangle {
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "waymini.h"
|
||||
#include "waymini/waymini.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user