This commit is contained in:
Nishi 2026-05-09 03:16:12 +09:00
commit d951a0bceb
Signed by: nishi
GPG key ID: 27EF69B208EB9343
15 changed files with 381 additions and 90 deletions

View file

@ -13,6 +13,11 @@ ifeq ($(TARGET),NetBSD)
UNIX = 1
endif
ifeq ($(TARGET),Windows)
MINGW = 1
WINDOWS = 1
endif
### Stuff
ifeq ($(UNIX),1)
CC = gcc
@ -23,11 +28,22 @@ ifeq ($(UNIX),1)
EXE =
endif
ifeq ($(WINDOWS),1)
EXE = .exe
endif
ifeq ($(MINGW),1)
CC = gcc
CFLAGS = -c
LDFLAGS =
LIBS =
endif
### Common flags
CFLAGS += -Iexternal/duktape -Iexternal/stb
### Rules
OBJS = src/main.o src/js.o
OBJS = src/main.o src/js.o src/js_console.o src/js_process.o src/js_fs.o
OBJS += external/duktape/duktape.o external/stb/stb_ds.o
NAME = rev | cut -d/ -f1 | rev | cut -d. -f1
@ -85,5 +101,6 @@ pmake$(EXE): $(OBJS)
$(CC) $(CFLAGS) -o $@ $<
clean:
rm -f pmake pmake.exe
find . -name "*.o" >/dev/null && rm -f $(shell find . -name "*.o")
rm -f src/compiler/*.c
rm -f src/compiler/*.c src/action/*.c src/js/*.c