Add build system and boilerplate
FossilOrigin-Name: f4f7ec59913f58beff7b54b86e3ea84fb45b1bfd6950719adef3975e71c610a5
This commit is contained in:
parent
f456a2b790
commit
6ae5b43b5a
15 changed files with 5287 additions and 0 deletions
45
tests/Makefile
Normal file
45
tests/Makefile
Normal file
|
@ -0,0 +1,45 @@
|
|||
PROG_NOINST = tests${PROG_SUFFIX}
|
||||
SRCS = TestsAppDelegate.m
|
||||
|
||||
include ../buildsys.mk
|
||||
include ../extra.mk
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR}
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}
|
||||
rm -f obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll
|
||||
rm -f libobj3dengine.${OBJ3DENGINE_LIB_MAJOR}.dylib
|
||||
if test -f ../src/libobj3dengine.so; then \
|
||||
${LN_S} ../src/libobj3dengine.so \
|
||||
libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR}; \
|
||||
${LN_S} ../src/libobj3dengine.so \
|
||||
libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; \
|
||||
elif test -f ../src/libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; then \
|
||||
${LN_S} ../src/libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR} \
|
||||
libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; \
|
||||
fi
|
||||
if test -f ../src/obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll; then \
|
||||
${LN_S} ../src/obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll \
|
||||
obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll; \
|
||||
fi
|
||||
if test -f ../src/libobj3dengine.dylib; then \
|
||||
${LN_S} ../src/libobj3dengine.dylib \
|
||||
libobj3dengine.${OBJ3DENGINE_LIB_MAJOR}.dylib; \
|
||||
fi
|
||||
LD_LIBRARY_PATH=.$${LD_LIBRARY_PATH+:}$$LD_LIBRARY_PATH \
|
||||
DYLD_FRAMEWORK_PATH=../src$${DYLD_FRAMEWORK_PATH+:}$$DYLD_FRAMEWORK_PATH \
|
||||
DYLD_LIBRARY_PATH=.$${DYLD_LIBRARY_PATH+:}$$DYLD_LIBRARY_PATH \
|
||||
LIBRARY_PATH=.$${LIBRARY_PATH+:}$$LIBRARY_PATH \
|
||||
${WRAPPER} ./${PROG_NOINST}; EXIT=$$?; \
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR}; \
|
||||
rm -f libobj3dengine.so.${OBJ3DENGINE_LIB_MAJOR_MINOR}; \
|
||||
rm -f obj3dengine${OBJ3DENGINE_LIB_MAJOR}.dll; \
|
||||
rm -f libobj3dengine.${OBJ3DENGINE_LIB_MAJOR}.dylib; \
|
||||
exit $$EXIT
|
||||
|
||||
${PROG_NOINST}: ${LIBOBJ3DENGINE_DEP}
|
||||
|
||||
CPPFLAGS += -I../src -I../src/exceptions
|
||||
LIBS := -L../src -lobj3dengine ${LIBS}
|
||||
LD = ${OBJC}
|
28
tests/TestsAppDelegate.m
Normal file
28
tests/TestsAppDelegate.m
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* Copyright (c) 2022 Jonathan Schleifer <js@nil.im>
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* This file is part of Obj3DEngine. It may be distributed under the terms of
|
||||
* the Q Public License 1.0, which can be found in the file LICENSE.QPL
|
||||
* included in the packaging of this file.
|
||||
*
|
||||
* Alternatively, it may be distributed under the terms of the GNU General
|
||||
* Public License, either version 2 or 3, which can be found in the file
|
||||
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of
|
||||
* this file.
|
||||
*/
|
||||
|
||||
#import <ObjFW/ObjFW.h>
|
||||
|
||||
@interface TestsAppDelegate: OFObject <OFApplicationDelegate>
|
||||
@end
|
||||
|
||||
OF_APPLICATION_DELEGATE(TestsAppDelegate)
|
||||
|
||||
@implementation TestsAppDelegate
|
||||
- (void)applicationDidFinishLaunching: (OFNotification *)notification
|
||||
{
|
||||
[OFApplication terminate];
|
||||
}
|
||||
@end
|
Loading…
Add table
Add a link
Reference in a new issue