Added build dir, and gitignore
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
build/
|
||||||
9
Makefile
9
Makefile
@@ -1,7 +1,9 @@
|
|||||||
SHELL := /bin/bash
|
SHELL := /bin/bash
|
||||||
CC := cc
|
CC := cc
|
||||||
CFLAGS := -Wall -O2
|
MKDIR := mkdir
|
||||||
TARGET := fa2json
|
CFLAGS := -Wall -Werror -Os
|
||||||
|
BUILD_DIR := build
|
||||||
|
TARGET := $(BUILD_DIR)/fa2json
|
||||||
SRCS := fs-watcher.c json-writer.c
|
SRCS := fs-watcher.c json-writer.c
|
||||||
|
|
||||||
.PHONY: all test dev clean
|
.PHONY: all test dev clean
|
||||||
@@ -9,6 +11,7 @@ SRCS := fs-watcher.c json-writer.c
|
|||||||
all: $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(SRCS)
|
$(TARGET): $(SRCS)
|
||||||
|
$(MKDIR) -p $(BUILD_DIR)
|
||||||
$(CC) $(CFLAGS) -o $@ $^
|
$(CC) $(CFLAGS) -o $@ $^
|
||||||
|
|
||||||
test: $(TARGET)
|
test: $(TARGET)
|
||||||
@@ -18,4 +21,4 @@ dev: $(TARGET)
|
|||||||
node test/dev.mjs $(ARGS)
|
node test/dev.mjs $(ARGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(TARGET)
|
rm -rf $(BUILD_DIR)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { mkdtempSync, mkdirSync } from 'node:fs';
|
|||||||
import { tmpdir } from 'node:os';
|
import { tmpdir } from 'node:os';
|
||||||
import { join } from 'node:path';
|
import { join } from 'node:path';
|
||||||
|
|
||||||
const FA2JSON = new URL('../../fa2json', import.meta.url).pathname;
|
const FA2JSON = new URL('../../build/fa2json', import.meta.url).pathname;
|
||||||
|
|
||||||
export async function setup() {
|
export async function setup() {
|
||||||
// Create image file and format
|
// Create image file and format
|
||||||
|
|||||||
Reference in New Issue
Block a user