add install and uninstall options to Makefile
This commit is contained in:
16
Makefile
16
Makefile
@@ -1,2 +1,14 @@
|
|||||||
run:
|
PREFIX ?= /usr/local
|
||||||
./build-unix.sh && ./dotscape
|
|
||||||
|
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
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mlton -link-opt "$(pkg-config --cflags glfw3) $(pkg-config --static --libs glfw3)" \
|
mlton -link-opt "$(pkg-config --cflags glfw3) $(pkg-config --static --libs glfw3)" \
|
||||||
-export-header ffi/export.h \
|
-export-header ffi/export.h \
|
||||||
|
-output dsc \
|
||||||
dotscape.mlb \
|
dotscape.mlb \
|
||||||
ffi/glad.c \
|
ffi/glad.c \
|
||||||
ffi/glfw-export.c \
|
ffi/glfw-export.c \
|
||||||
|
|||||||
22
ffi/export.h
22
ffi/export.h
@@ -1,5 +1,5 @@
|
|||||||
#ifndef __DOTSCAPE_ML_H__
|
#ifndef __DSC_ML_H__
|
||||||
#define __DOTSCAPE_ML_H__
|
#define __DSC_ML_H__
|
||||||
|
|
||||||
/* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
|
/* Copyright (C) 2004-2007 Henry Cejtin, Matthew Fluet, Suresh
|
||||||
* Jagannathan, and Stephen Weeks.
|
* Jagannathan, and Stephen Weeks.
|
||||||
@@ -132,23 +132,23 @@ typedef Pointer Objptr;
|
|||||||
|
|
||||||
#endif /* _MLTON_EXPORT_H_ */
|
#endif /* _MLTON_EXPORT_H_ */
|
||||||
|
|
||||||
#if !defined(PART_OF_DOTSCAPE) && \
|
#if !defined(PART_OF_DSC) && \
|
||||||
!defined(STATIC_LINK_DOTSCAPE) && \
|
!defined(STATIC_LINK_DSC) && \
|
||||||
!defined(DYNAMIC_LINK_DOTSCAPE)
|
!defined(DYNAMIC_LINK_DSC)
|
||||||
#define PART_OF_DOTSCAPE
|
#define PART_OF_DSC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PART_OF_DOTSCAPE)
|
#if defined(PART_OF_DSC)
|
||||||
#define MLLIB_PRIVATE(x) PRIVATE x
|
#define MLLIB_PRIVATE(x) PRIVATE x
|
||||||
#define MLLIB_PUBLIC(x) PUBLIC x
|
#define MLLIB_PUBLIC(x) PUBLIC x
|
||||||
#elif defined(STATIC_LINK_DOTSCAPE)
|
#elif defined(STATIC_LINK_DSC)
|
||||||
#define MLLIB_PRIVATE(x)
|
#define MLLIB_PRIVATE(x)
|
||||||
#define MLLIB_PUBLIC(x) PUBLIC x
|
#define MLLIB_PUBLIC(x) PUBLIC x
|
||||||
#elif defined(DYNAMIC_LINK_DOTSCAPE)
|
#elif defined(DYNAMIC_LINK_DSC)
|
||||||
#define MLLIB_PRIVATE(x)
|
#define MLLIB_PRIVATE(x)
|
||||||
#define MLLIB_PUBLIC(x) EXTERNAL x
|
#define MLLIB_PUBLIC(x) EXTERNAL x
|
||||||
#else
|
#else
|
||||||
#error Must specify linkage for dotscape
|
#error Must specify linkage for dsc
|
||||||
#define MLLIB_PRIVATE(x)
|
#define MLLIB_PRIVATE(x)
|
||||||
#define MLLIB_PUBLIC(x)
|
#define MLLIB_PUBLIC(x)
|
||||||
#endif
|
#endif
|
||||||
@@ -169,4 +169,4 @@ MLLIB_PUBLIC(void mltonKeyCallback (Int32 x0, Int32 x1, Int32 x2, Int32 x3);)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* __DOTSCAPE_ML_H__ */
|
#endif /* __DSC_ML_H__ */
|
||||||
|
|||||||
Reference in New Issue
Block a user