mirror of
https://github.com/janet-lang/janet
synced 2025-10-23 11:47:40 +00:00
Bundle more dst code (sans method of installation)
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
# Copyright (c) 2017 Calvin Rose
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
cmake_minimum_required(VERSION 3.7)
|
||||
project(hello)
|
||||
|
||||
# Set Some Variables
|
||||
set(TARGET_NAME "hello")
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
|
||||
set(SOURCES main.c)
|
||||
|
||||
include_directories(../../src/include)
|
||||
|
||||
# Build the module
|
||||
add_library(${TARGET_NAME} SHARED ${SOURCES})
|
@@ -1,37 +1,24 @@
|
||||
# Copyright (c) 2018 Calvin Rose
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
# Autogenerated Makefile, do not edit
|
||||
# Generated at Fri Aug 3 22:55:50 EDT 2018
|
||||
|
||||
CFLAGS=-std=c99 -Wall -Wextra -I../../src/include -O2
|
||||
TARGET=hello.so
|
||||
CFLAGS:=-std=c99 -Wall -Wextra -O2 -shared -fpic
|
||||
LDFLAGS:=
|
||||
SOURCES:=main.c
|
||||
HEADERS:=
|
||||
OBJECTS:=$(patsubst %.c,%.o,${SOURCES})
|
||||
TARGET:=hello.so
|
||||
|
||||
UNAME:=$(shell uname -s)
|
||||
ifeq ($(UNAME), Darwin)
|
||||
CFLAGS:=$(CFLAGS) -undefined dynamic_lookup
|
||||
endif
|
||||
all: ${TARGET}
|
||||
|
||||
SOURCES=main.c
|
||||
%.o: %.c ${HEADERS}
|
||||
${CC} ${CFLAGS} -o $@ -c $< ${LDFLAGS}
|
||||
|
||||
$(TARGET): $(SOURCES)
|
||||
$(CC) $(CFLAGS) -shared -fpic -o $@ $<
|
||||
${TARGET}: ${OBJECTS}
|
||||
${CC} ${CFLAGS} -o $@ $^ ${LDFLAGS}
|
||||
|
||||
clean:
|
||||
rm $(TARGET)
|
||||
clean:
|
||||
rm ${OBJECTS}
|
||||
rm ${TARGET}
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
.PHONY: clean
|
||||
|
5
natives/hello/metab.dst
Executable file
5
natives/hello/metab.dst
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env dst
|
||||
|
||||
(import metabuild :as mb)
|
||||
|
||||
(mb.generate "hello" @["main.c"])
|
Reference in New Issue
Block a user