First changes and new makefile to have it compile on OS4
This commit is contained in:
parent
38bd9b3326
commit
3a5cadc116
|
@ -0,0 +1,5 @@
|
|||
src/*.o
|
||||
src/*/*.o
|
||||
src/*/*/*.o
|
||||
lite
|
||||
*.txt
|
|
@ -0,0 +1,103 @@
|
|||
#
|
||||
# Makefile generated by:
|
||||
# codebench 0.55
|
||||
#
|
||||
# Project: lite
|
||||
#
|
||||
# Created on: 14-12-2021 20:40:46
|
||||
#
|
||||
#
|
||||
|
||||
###################################################################
|
||||
##
|
||||
##//// Objects
|
||||
##
|
||||
###################################################################
|
||||
|
||||
lite_OBJ := \
|
||||
src/lib/stb/stb_truetype.o src/api/renderer.o src/api/renderer_font.o \
|
||||
src/api/system.o src/main.o src/api/api.o \
|
||||
src/rencache.o src/renderer.o
|
||||
|
||||
|
||||
###################################################################
|
||||
##
|
||||
##//// Variables and Environment
|
||||
##
|
||||
###################################################################
|
||||
|
||||
CC := gcc:bin/gcc
|
||||
|
||||
INCPATH := -I.
|
||||
|
||||
CFLAGS := $(INCPATH) -D__USE_INLINE__ -Wall -Werror -Wwrite-strings -Isrc
|
||||
|
||||
|
||||
###################################################################
|
||||
##
|
||||
##//// General rules
|
||||
##
|
||||
###################################################################
|
||||
|
||||
.PHONY: all all-before all-after clean clean-custom realclean
|
||||
|
||||
all: all-before lite all-after
|
||||
|
||||
all-before:
|
||||
# You can add rules here to execute before the project is built
|
||||
|
||||
all-after:
|
||||
# You can add rules here to execute after the project is built
|
||||
|
||||
clean: clean-custom
|
||||
@echo "Cleaning compiler objects..."
|
||||
@rm -f $(lite_OBJ)
|
||||
|
||||
realclean:
|
||||
@echo "Cleaning compiler objects and targets..."
|
||||
@rm -f $(lite_OBJ) lite
|
||||
|
||||
|
||||
###################################################################
|
||||
##
|
||||
##//// Targets
|
||||
##
|
||||
###################################################################
|
||||
|
||||
lite: $(lite_OBJ)
|
||||
@echo "Linking lite"
|
||||
@gcc:bin/gcc -o lite $(lite_OBJ) -llua -lSDL2 -lfreetype -lpthread -lauto
|
||||
@echo "Removing stale debug target: lite"
|
||||
@rm -f lite.debug
|
||||
|
||||
|
||||
###################################################################
|
||||
##
|
||||
##//// Standard rules
|
||||
##
|
||||
###################################################################
|
||||
|
||||
# A default rule to make all the objects listed below
|
||||
# because we are hiding compiler commands from the output
|
||||
|
||||
.c.o:
|
||||
@echo "Compiling $<"
|
||||
@$(CC) -c $< -o $*.o $(CFLAGS)
|
||||
|
||||
src/api/api.o: src/api/api.c
|
||||
|
||||
src/api/renderer.o: src/api/renderer.c
|
||||
|
||||
src/api/renderer_font.o: src/api/renderer_font.c
|
||||
|
||||
src/api/system.o: src/api/system.c
|
||||
|
||||
src/main.o: src/main.c src/api/api.h src/renderer.h \
|
||||
|
||||
|
||||
src/rencache.o: src/rencache.c src/rencache.h
|
||||
|
||||
src/renderer.o: src/renderer.c src/lib/stb/stb_truetype.h
|
||||
|
||||
src/lib/stb/stb_truetype.o: src/lib/stb/stb_truetype.c
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" ?>
|
||||
<CodeBench_Project name="lite" path="Applications:Programming/workspace/OtherProjects/lite/lite.cbp" created="1387049720" lastmodified="1387055061">
|
||||
<plugin name="PROGDIR:Plugins/AmigaOS4SDK.CCPlugin" flags="0"/>
|
||||
<target/>
|
||||
<homedir name="Applications:Programming/workspace/OtherProjects/lite"/>
|
||||
<includedir name="Applications:Programming/workspace/OtherProjects/lite/src"/>
|
||||
<compiler name="gcc:bin/gcc" switches="-D__USE_INLINE__ -Wall -Werror -Wwrite-strings -Isrc" stack="131072"/>
|
||||
<linker switches="-lauto"/>
|
||||
<debugger name="SDK:c/gdb"/>
|
||||
<builder name="SDK:c/make -f"/>
|
||||
<environment/>
|
||||
<headers>
|
||||
<file name="Applications:Programming/workspace/OtherProjects/lite/src/api/api.h" open="0"/>
|
||||
<file name="Applications:Programming/workspace/OtherProjects/lite/src/rencache.h" open="0"/>
|
||||
<file name="Applications:Programming/workspace/OtherProjects/lite/src/lib/stb/stb_truetype.h" open="0"/>
|
||||
<file name="Applications:Programming/workspace/OtherProjects/lite/src/renderer.h" open="0"/>
|
||||
</headers>
|
||||
<sources>
|
||||
<file name="src/api/api.c" open="0"/>
|
||||
<file name="src/api/renderer.c" open="0"/>
|
||||
<file name="src/api/renderer_font.c" open="0"/>
|
||||
<file name="src/api/system.c" open="0"/>
|
||||
<file name="src/main.c" open="1" current="1" top="0" left="0" line="119" row="25"/>
|
||||
<file name="src/rencache.c" open="0"/>
|
||||
<file name="src/renderer.c" open="0"/>
|
||||
<file name="src/lib/stb/stb_truetype.c" open="0"/>
|
||||
</sources>
|
||||
<flags value="0x0000000000078005"/>
|
||||
<buildscript name="Makefile" depth="3" open="0"/>
|
||||
<projectnotes open="0"/>
|
||||
<buildwindow open="1"/>
|
||||
<targets>
|
||||
<target name="lite" linker="gcc:bin/gcc" switches="-llua -lSDL2 -lfreetype -lpthread -lauto" flags="0x00000002">
|
||||
<file name="src/lib/stb/stb_truetype.c"/>
|
||||
<file name="src/api/renderer.c"/>
|
||||
<file name="src/api/renderer_font.c"/>
|
||||
<file name="src/api/system.c"/>
|
||||
<file name="src/main.c"/>
|
||||
<file name="src/api/api.c"/>
|
||||
<file name="src/rencache.c"/>
|
||||
<file name="src/renderer.c"/>
|
||||
</target>
|
||||
</targets>
|
||||
<logfile name="RAM Disk:Build.log"/>
|
||||
<search lastsearch="stbtt_Scale" sensecase="1" replace_state="0"/>
|
||||
</CodeBench_Project>
|
Binary file not shown.
|
@ -1,9 +1,15 @@
|
|||
#ifndef API_H
|
||||
#define API_H
|
||||
|
||||
#if __amigaos4__
|
||||
#include "lua.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lualib.h"
|
||||
#else
|
||||
#include "lib/lua52/lua.h"
|
||||
#include "lib/lua52/lauxlib.h"
|
||||
#include "lib/lua52/lualib.h"
|
||||
#endif
|
||||
|
||||
#define API_TYPE_FONT "Font"
|
||||
|
||||
|
|
|
@ -38,6 +38,9 @@ static void get_exe_filename(char *buf, int sz) {
|
|||
#elif __APPLE__
|
||||
unsigned size = sz;
|
||||
_NSGetExecutablePath(buf, &size);
|
||||
#elif __amigaos4__
|
||||
// TODO: Temporary. Needs to be done properly
|
||||
strcpy(buf, "Applications:Programming/workspace/MyProjects/lite/lite");
|
||||
#else
|
||||
strcpy(buf, "./lite");
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue