diff --git a/Makefile b/Makefile index be9433f..46ef674 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,14 @@ -run: - ./build-unix.sh && ./dotscape +PREFIX ?= /usr/local + +run: build + ./dsc + +build: + ./build-unix.sh + +install: build + install -d $(DESTDIR)$(PREFIX)/bin/ + install -m 755 dsc $(DESTDIR)$(PREFIX)/bin/ + +uninstall: + rm $(DESTDIR)$(PREFIX)/bin/dsc diff --git a/build-unix.sh b/build-unix.sh index 0c241ed..1f51110 100755 --- a/build-unix.sh +++ b/build-unix.sh @@ -1,6 +1,7 @@ #!/bin/sh mlton -link-opt "$(pkg-config --cflags glfw3) $(pkg-config --static --libs glfw3)" \ -export-header ffi/export.h \ + -output dsc \ dotscape.mlb \ ffi/glad.c \ ffi/glfw-export.c \ diff --git a/dotscape b/dotscape deleted file mode 100755 index 74f86ac..0000000 Binary files a/dotscape and /dev/null differ diff --git a/ffi/export.h b/ffi/export.h index 5864c66..78d9391 100644 --- a/ffi/export.h +++ b/ffi/export.h @@ -1,5 +1,5 @@ -#ifndef __DOTSCAPE_ML_H__ -#define __DOTSCAPE_ML_H__ +#ifndef __DSC_ML_H__ +#define __DSC_ML_H__ /* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh * Jagannathan, and Stephen Weeks. @@ -132,23 +132,23 @@ typedef Pointer Objptr; #endif /* _MLTON_EXPORT_H_ */ -#if !defined(PART_OF_DOTSCAPE) && \ - !defined(STATIC_LINK_DOTSCAPE) && \ - !defined(DYNAMIC_LINK_DOTSCAPE) -#define PART_OF_DOTSCAPE +#if !defined(PART_OF_DSC) && \ + !defined(STATIC_LINK_DSC) && \ + !defined(DYNAMIC_LINK_DSC) +#define PART_OF_DSC #endif -#if defined(PART_OF_DOTSCAPE) +#if defined(PART_OF_DSC) #define MLLIB_PRIVATE(x) PRIVATE x #define MLLIB_PUBLIC(x) PUBLIC x -#elif defined(STATIC_LINK_DOTSCAPE) +#elif defined(STATIC_LINK_DSC) #define MLLIB_PRIVATE(x) #define MLLIB_PUBLIC(x) PUBLIC x -#elif defined(DYNAMIC_LINK_DOTSCAPE) +#elif defined(DYNAMIC_LINK_DSC) #define MLLIB_PRIVATE(x) #define MLLIB_PUBLIC(x) EXTERNAL x #else -#error Must specify linkage for dotscape +#error Must specify linkage for dsc #define MLLIB_PRIVATE(x) #define MLLIB_PUBLIC(x) #endif @@ -169,4 +169,4 @@ MLLIB_PUBLIC(void mltonKeyCallback (Int32 x0, Int32 x1, Int32 x2, Int32 x3);) } #endif -#endif /* __DOTSCAPE_ML_H__ */ +#endif /* __DSC_ML_H__ */