generated from loic/c-template
refactor: folder skel
This commit is contained in:
parent
53b66c29ee
commit
3bf9a264bf
10 changed files with 308 additions and 154 deletions
18
Makefile
18
Makefile
|
|
@ -1,14 +1,16 @@
|
|||
SRC_DIR = src
|
||||
COLLEEN_SRCS = $(SRC_DIR)/Colleen.c
|
||||
GRACE_SRCS = $(SRC_DIR)/Grace.c
|
||||
SULLY_SRCS = $(SRC_DIR)/Sully.c
|
||||
COLLEEN_SRCS = $(SRC_DIR)/Colleen/Colleen.c
|
||||
GRACE_SRCS = $(SRC_DIR)/Grace/Grace.c
|
||||
SULLY_SRCS = $(SRC_DIR)/Sully/Sully.c
|
||||
|
||||
COLLEEN = Colleen
|
||||
GRACE = Grace
|
||||
SULLY = Sully
|
||||
|
||||
COLLEEN_ASM_SRCS = $(SRC_DIR)/Colleen.s
|
||||
COLLEEN_ASM_SRCS = $(SRC_DIR)/Colleen/Colleen.s
|
||||
COLLEEN_ASM = Colleen_asm
|
||||
GRACE_ASM_SRCS = $(SRC_DIR)/Grace/Grace.s
|
||||
GRACE_ASM = Grace_asm
|
||||
NASM = nasm
|
||||
NASMFLAGS = -f elf64
|
||||
LD = ld
|
||||
|
|
@ -33,9 +35,10 @@ SULLY_OBJS = $(SULLY_SRCS:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
|
|||
SULLY_DEPS = $(SULLY_OBJS:.o=.d)
|
||||
|
||||
COLLEEN_ASM_OBJS = $(COLLEEN_ASM_SRCS:$(SRC_DIR)/%.s=$(OBJ_DIR)/%.asm.o)
|
||||
GRACE_ASM_OBJS = $(GRACE_ASM_SRCS:$(SRC_DIR)/%.s=$(OBJ_DIR)/%.asm.o)
|
||||
|
||||
.PHONY: all
|
||||
all: $(COLLEEN) $(GRACE) $(SULLY) $(COLLEEN_ASM)
|
||||
all: $(COLLEEN) $(GRACE) $(SULLY) $(COLLEEN_ASM) $(GRACE_ASM)
|
||||
|
||||
$(GRACE): $(GRACE_OBJS)
|
||||
$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
|
@ -49,6 +52,9 @@ $(SULLY): $(SULLY_OBJS)
|
|||
$(COLLEEN_ASM): $(COLLEEN_ASM_OBJS)
|
||||
$(LD) -o $@ $^
|
||||
|
||||
$(GRACE_ASM): $(GRACE_ASM_OBJS)
|
||||
$(LD) -o $@ $^
|
||||
|
||||
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -c $< -o $@
|
||||
|
|
@ -67,7 +73,7 @@ clean:
|
|||
|
||||
.PHONY: fclean
|
||||
fclean: clean
|
||||
$(RM) $(COLLEEN) $(GRACE) $(SULLY) $(COLLEEN_ASM)
|
||||
$(RM) $(COLLEEN) $(GRACE) $(SULLY) $(COLLEEN_ASM) $(GRACE_ASM)
|
||||
|
||||
.PHONY: re
|
||||
re: fclean
|
||||
|
|
|
|||
148
src/Colleen.s
148
src/Colleen.s
File diff suppressed because one or more lines are too long
148
src/Colleen/Colleen.s
Normal file
148
src/Colleen/Colleen.s
Normal file
File diff suppressed because one or more lines are too long
148
src/Grace/Grace.s
Normal file
148
src/Grace/Grace.s
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue