Merge branch 'main' of https://git.planet-casio.com/Potter360/omega
This commit is contained in:
commit
3f8af51ab9
46
Makefile
46
Makefile
|
@ -1,46 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
CFLAGS= -Iinclude -ffreestanding -flto -nostdlib -O2 -Wall -Wextra
|
||||
SRC_DIR=src
|
||||
OBJ_DIR = build
|
||||
|
||||
SRC := $(wildcard $(SRC_DIR)/*.c $(SRC_DIR)/*.s)
|
||||
SRC += $(wildcard $(SRC_DIR)/*/*.c $(SRC_DIR)/*/*.s)
|
||||
|
||||
OBJ := $(patsubst $(SRC_DIR)/%.c,$(OBJ_DIR)/%.o,$(SRC))
|
||||
OBJ := $(patsubst $(SRC_DIR)/%.s,$(OBJ_DIR)/%.o,$(OBJ))
|
||||
|
||||
DESTDIR?="/usr"
|
||||
|
||||
all: compile clean
|
||||
|
||||
|
||||
compile: omega.a
|
||||
|
||||
$(OBJ_DIR):
|
||||
mkdir -p $(OBJ_DIR)
|
||||
omega.a: $(OBJ)
|
||||
ar rcs $@ $^
|
||||
|
||||
|
||||
build/%.o: src/%.c $(OBJ_DIR)
|
||||
mkdir -p $(dir $@)
|
||||
sh-elf-gcc $(CFLAGS) -c $< -o $@ -lgcc
|
||||
|
||||
build/%.o: src/%.s $(OBJ_DIR)
|
||||
mkdir -p $(dir $@)
|
||||
sh-elf-gcc $(CFLAGS) -c $< -o $@ -lgcc
|
||||
|
||||
install:
|
||||
cp omega.a $(DESTDIR)/local/lib
|
||||
cp -r include/omega $(DESTDIR)/local/include
|
||||
uninstall:
|
||||
rm $(DESTDIR)/local/lib/omega.a
|
||||
rm -r $(DESTDIR)/local/include/omega
|
||||
clean:
|
||||
rm -rf build
|
||||
|
||||
.PHONY: all compile clean
|
||||
=======
|
||||
CFLAGS= -Iinclude -ffreestanding -flto -nostdlib -O2 -Wall -Wextra
|
||||
SRC_DIR=src
|
||||
OBJ_DIR = build
|
||||
|
@ -79,7 +36,6 @@ uninstall:
|
|||
rm $(DESTDIR)/local/lib/omega.a
|
||||
rm -r $(DESTDIR)/local/include/omega
|
||||
clean:
|
||||
rm -rf build omega.a
|
||||
rm -rf build
|
||||
|
||||
.PHONY: all compile clean
|
||||
>>>>>>> ff5ff622bb0b3810878fd6004ca9d2073f506095
|
||||
|
|
|
@ -1,37 +1,3 @@
|
|||
<<<<<<< HEAD
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#define rgb565(r, g, b) (((r & 0x1F) << 11) | ((g & 0x3F) << 5) | (b & 0x1F))
|
||||
#define C_BLACK rgb565(0,0,0)
|
||||
#define C_RED rgb565(255,0,0)
|
||||
#define C_WHITE rgb565(255,255,255)
|
||||
#define DWIDTH 396
|
||||
#define DHEIGHT 224
|
||||
|
||||
// image_t type for images
|
||||
typedef struct
|
||||
{
|
||||
uint16_t height;
|
||||
uint16_t width;
|
||||
|
||||
uint16_t pixels[];
|
||||
} image_t;
|
||||
|
||||
extern uint16_t vram[DWIDTH*DHEIGHT];
|
||||
// put pixel in VRAM at position (x,y) with color
|
||||
void dpixel(int x,int y,uint16_t color);
|
||||
// display vram
|
||||
void dupdate(void);
|
||||
// initialize vram with white pixels
|
||||
void dinit(void);
|
||||
void dimage(int x, int y, image_t *image);
|
||||
void dclear(uint16_t color);
|
||||
void dtext(int x, int y, char *str, uint16_t color);
|
||||
void dprintf(int x, int y, uint16_t color, char *format, ...);
|
||||
void drect(int x1, int y1, int x2, int y2, uint16_t color);
|
||||
void dline(int x1, int y1, int x2, int y2, uint16_t color);
|
||||
=======
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
@ -59,9 +25,8 @@ void dupdate(void);
|
|||
// initialize vram with white pixels
|
||||
void dinit(void);
|
||||
void dimage(int x, int y, image_t *image);
|
||||
void dclear(void);
|
||||
void dclear(uint16_t color);
|
||||
void dtext(int x, int y, char *str, uint16_t color);
|
||||
void dprintf(int x, int y, uint16_t color, char *format, ...);
|
||||
void drect(int x1, int y1, int x2, int y2, uint16_t color);
|
||||
void dline(int x1, int y1, int x2, int y2, uint16_t color);
|
||||
>>>>>>> ff5ff622bb0b3810878fd6004ca9d2073f506095
|
||||
|
|
Loading…
Reference in New Issue