add: dynamic Windows APIs, blank IAT fix: misc & linux build
This commit is contained in:
32
Makefile
32
Makefile
@@ -1,38 +1,36 @@
|
||||
SRC = src/pasm.c \
|
||||
src/file_utils.c \
|
||||
src/interpreter_states.c \
|
||||
src/instructions.c \
|
||||
src/api.c \
|
||||
src/debug.c
|
||||
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 = gcc
|
||||
CFLAGS = -Wall -Wextra -Wpedantic -Iinclude -s -Os -fno-ident -fno-asynchronous-unwind-tables
|
||||
CLIBS = -lm
|
||||
|
||||
all: $(NAME)
|
||||
all: $(NAME)
|
||||
|
||||
lib: $(OBJ)
|
||||
@-mkdir build
|
||||
@mkdir -p build
|
||||
ar rc build/lib$(NAME).a $(OBJ)
|
||||
|
||||
$(NAME): fclean
|
||||
$(NAME): lib
|
||||
$(NAME): CLIBS += build/lib$(NAME).a
|
||||
$(NAME):
|
||||
$(CC) tests/interpreter.c $(CFLAGS) $(CLIBS) -o build/$(NAME)
|
||||
$(CC) $(CFLAGS) -o build/$(NAME) tests/interpreter.c build/lib$(NAME).a $(CLIBS)
|
||||
|
||||
interpreter: $(NAME)
|
||||
|
||||
clean:
|
||||
@-rm -f $(OBJ)
|
||||
@-cd tests && $(MAKE) clean
|
||||
@rm -f $(OBJ)
|
||||
@cd tests && $(MAKE) clean
|
||||
|
||||
fclean: clean
|
||||
@-rm -rf build/
|
||||
@-cd tests && $(MAKE) fclean
|
||||
@rm -rf build/
|
||||
@cd tests && $(MAKE) fclean
|
||||
|
||||
re: fclean
|
||||
re: $(NAME)
|
||||
|
||||
.PHONY : all $(NAME) clean fclean re interpreter lib
|
||||
.PHONY: all $(NAME) clean fclean re interpreter lib
|
||||
Reference in New Issue
Block a user