-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile_Windows
More file actions
34 lines (27 loc) · 1002 Bytes
/
Makefile_Windows
File metadata and controls
34 lines (27 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
SRC = src/pasm.c \
src/file_utils.c \
src/interpreter_states.c \
src/instructions.c \
src/api.c \
src/debug.c \
src/libc.c
OBJ = $(SRC:.c=.o)
NAME = pasm
CC = C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin\clang
CFLAGS = -Os -Iinclude -fno-asynchronous-unwind-tables -DUNICODE -D_UNICODE -m32 -fwritable-strings -DLAIKA -nostdlib -D_WIN32_WINNT=0x0501
AR = C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin\llvm-ar
RANLIB = C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\Llvm\x64\bin\llvm-ranlib
all: $(NAME)
lib: $(OBJ)
@if not exist bin (mkdir bin)
$(AR) rc bin/$(NAME).lib $(OBJ)
$(RANLIB) bin/$(NAME).lib
$(NAME): lib
$(CC) $(CFLAGS) -o bin/$(NAME) tests/interpreter.c -Lbin -lpasm
interpreter: $(NAME)
clean:
@if exist bin (del /q bin\*.*)
@if exist src\*.o (del /q src\*.o)
fclean: clean
@if exist bin (rmdir bin)
.PHONY: all $(NAME) interpreter lib clean fclean