compile on openbsd
This commit is contained in:
parent
241ddd9cea
commit
c08fbb0840
15
makefile
15
makefile
@ -2,17 +2,20 @@
|
|||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
CC ?= gcc
|
#CC ?= gcc
|
||||||
SRCDIR = ./src
|
SRCDIR = ./src
|
||||||
CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \
|
CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \
|
||||||
-I${SRCDIR} -DLUA_USE_POSIX
|
-I${SRCDIR} -I${PREFIX}/include/ -DLUA_USE_POSIX
|
||||||
# remove this
|
# remove this
|
||||||
LDFLAGS = -lSDL2 -lm -llua5.2
|
LDFLAGS = -L${PREFIX}/lib -lSDL2 -lm -llua5.2
|
||||||
FILES != find ${SRCDIR} -name '*.c'
|
FILES != find ${SRCDIR} -name '*.c'
|
||||||
OBJS = $(FILES:.c=.o)
|
OBJS = ${FILES:.c=.o}
|
||||||
|
|
||||||
|
.c.o:
|
||||||
|
${CC} -c ${CFLAGS} $< -o $@
|
||||||
|
|
||||||
lite: ${OBJS}
|
lite: ${OBJS}
|
||||||
${CC} ${LDFLAGS} $^ -o $@
|
${CC} ${LDFLAGS} -o $@ ${OBJS}
|
||||||
|
|
||||||
install: lite
|
install: lite
|
||||||
mkdir -p ${DESTDIR}${PREFIX}/share/lite
|
mkdir -p ${DESTDIR}${PREFIX}/share/lite
|
||||||
@ -36,4 +39,4 @@ uninstall:
|
|||||||
rm -rf ${DESTDIR}${PREFIX}/share/lite
|
rm -rf ${DESTDIR}${PREFIX}/share/lite
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f lite ${OBJS}
|
rm -f lite *.o ${OBJS}
|
||||||
|
@ -1,9 +1,15 @@
|
|||||||
#ifndef API_H
|
#ifndef API_H
|
||||||
#define API_H
|
#define API_H
|
||||||
|
|
||||||
|
#ifdef __OpenBSD__
|
||||||
|
#include <lua-5.2/lua.h>
|
||||||
|
#include <lua-5.2/lauxlib.h>
|
||||||
|
#include <lua-5.2/lualib.h>
|
||||||
|
#else
|
||||||
#include <lua5.2/lua.h>
|
#include <lua5.2/lua.h>
|
||||||
#include <lua5.2/lauxlib.h>
|
#include <lua5.2/lauxlib.h>
|
||||||
#include <lua5.2/lualib.h>
|
#include <lua5.2/lualib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define API_TYPE_FONT "Font"
|
#define API_TYPE_FONT "Font"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user