mirror of
https://github.com/guezoloic/minishell.git
synced 2026-01-25 09:34:22 +00:00
feat: update minishell structure
change rust language -> GNU Assembly add a Dockerfile to build on x64 linux also add Makefile pre config (must change)
This commit is contained in:
32
Makefile
Normal file
32
Makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
TARGET ?= main
|
||||
|
||||
SRC := $(wildcard src/*.s src/*.asm)
|
||||
OBJ := $(SRC:.s=.o)
|
||||
OBJ := $(OBJ:.asm=.o)
|
||||
|
||||
AS = as
|
||||
LD = ld
|
||||
NASM = nasm
|
||||
|
||||
ASFLAGS =
|
||||
NASMFLAGS = -f elf64
|
||||
LDFLAGS =
|
||||
|
||||
all: $(TARGET) run
|
||||
|
||||
%.o: %.s
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
%.o: %.asm
|
||||
$(NASM) $(NASMFLAGS) -o $@ $<
|
||||
|
||||
$(TARGET): $(OBJ)
|
||||
$(LD) $(LDFLAGS) -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f $(OBJ) $(TARGET)
|
||||
|
||||
re: clean all
|
||||
|
||||
run: $(TARGET)
|
||||
./$(TARGET)
|
||||
Reference in New Issue
Block a user