compile on openbsd

master
Alessandro Mauri 4 years ago
parent 241ddd9cea
commit c08fbb0840
  1. 15
      makefile
  2. 6
      src/api/api.h

@ -2,17 +2,20 @@
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
CC ?= gcc
#CC ?= gcc
SRCDIR = ./src
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
LDFLAGS = -lSDL2 -lm -llua5.2
LDFLAGS = -L${PREFIX}/lib -lSDL2 -lm -llua5.2
FILES != find ${SRCDIR} -name '*.c'
OBJS = $(FILES:.c=.o)
OBJS = ${FILES:.c=.o}
.c.o:
${CC} -c ${CFLAGS} $< -o $@
lite: ${OBJS}
${CC} ${LDFLAGS} $^ -o $@
${CC} ${LDFLAGS} -o $@ ${OBJS}
install: lite
mkdir -p ${DESTDIR}${PREFIX}/share/lite
@ -36,4 +39,4 @@ uninstall:
rm -rf ${DESTDIR}${PREFIX}/share/lite
clean:
rm -f lite ${OBJS}
rm -f lite *.o ${OBJS}

@ -1,9 +1,15 @@
#ifndef 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/lauxlib.h>
#include <lua5.2/lualib.h>
#endif
#define API_TYPE_FONT "Font"

Loading…
Cancel
Save