forked from SaadTalaat/CATernel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
41 lines (38 loc) · 1 KB
/
makefile
File metadata and controls
41 lines (38 loc) · 1 KB
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
35
36
37
38
39
40
41
OBJDIR = kern
OBJ = boot.o main.o
CC = gcc
LD = ld
DD = dd
OBJCOPY = objcopy
OBJDIRS := kern/boot
OBJDIRS2 := kern/boot
KERNDIR := kern/kernel
OBJS := $(OBJDIR)/boot/boot.o $(OBJDIR)/boot/main.o
CC_OPTIONS = -I include -Wformat -Werror -Wunreachable-code
KERN_CFILES = $(wildcard kernel/*.c)
KARCH = x86
#KERN_OBJFILES = $($(KERN_CFILES):.c=.o)
include kernel/makefile
include arch/makefile
#$(OBJDIR)/boot/boot:$(OBJS)
# $(LD) -N -e start -Ttext 0x7c00 -o $(OBJDIRS)/boot $^
# $(OBJCOPY) -S -O binary $(OBJDIRS)/boot
# python arch/x86/boot/sign.py
#$(OBJDIR)/boot/boot.o:arch/x86/boot/boot.S $(OBJDIR)
# $(CC) -nostdinc $(CC_OPTIONS) -c -o $@ $<
#echo $(CC) $< -> $@
#$(OBJDIR)/boot/main.o:arch/x86/boot/main.c $(OBJDIR)
# $(CC) -nostdinc $(CC_OPTIONS) -Os -c -o $@ $<
#echo $(CC) $< -> $@
all: $(OBJDIRS2)
always:
@:
$(OBJDIR):
@echo [*] Setting up directory tree.
@mkdir $@
@mkdir -p $(OBJDIRS)
.PHONY: clean all image
image:$(OBJDIR)/kernel/CATernel.img
clean:
@echo [*] Generated files removed.
@rm -rf $(OBJDIR)