2018-12-15 19:13:26 +01:00
|
|
|
CC=gcc -O0 -g -nostdinc -ffreestanding -fno-builtin -Wall -w -m32 -F elf_i386 -fno-pie -no-pie -I ../include -c
|
2018-12-16 01:50:03 +01:00
|
|
|
ASM=gcc -nostdinc -ffreestanding -fno-builtin -m32 -c -fno-pie -no-pie
|
2018-07-24 04:04:07 +02:00
|
|
|
LINK=ld -m elf_i386 -r -o
|
2018-09-27 17:12:12 +02:00
|
|
|
SRCS= $(wildcard *.c)
|
|
|
|
OBJS= $(SRCS:.c=.o)
|
2018-12-16 01:50:03 +01:00
|
|
|
SRCASM= $(wildcard *.S)
|
|
|
|
OBJASM= $(SRCASM:.S=.o)
|
2018-12-12 12:31:30 +01:00
|
|
|
CONVERT=dos2unix
|
|
|
|
INDENT=indent -nhnl -l75 -ppi3 -ts8 -bls -nbc -di8 -nbad -nbap -nsob -i8 -bl -bli0 -ncdw -nce -cli8 -cbi0 -npcs -cs -saf -sai -saw -nprs -lp -npsl
|
|
|
|
REMOVE=rm -f
|
|
|
|
CHANGEPERM=chmod 644
|
2020-09-17 09:52:56 +02:00
|
|
|
SYNC=sync
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-12-12 12:31:30 +01:00
|
|
|
all: libs.o
|
2020-09-17 09:52:56 +02:00
|
|
|
$(SYNC)
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-12-12 12:37:19 +01:00
|
|
|
togit: clean indent
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-12-16 01:50:03 +01:00
|
|
|
libs.o:$(OBJS) $(OBJASM)
|
|
|
|
$(LINK) libs.o $(OBJS) $(OBJASM)
|
|
|
|
|
|
|
|
.o: .S
|
|
|
|
$(ASM) $^
|
2007-04-02 15:21:56 +02:00
|
|
|
|
2018-12-15 19:13:26 +01:00
|
|
|
handlers.o:handlers.c
|
2018-12-19 16:13:47 +01:00
|
|
|
$(CC) -mgeneral-regs-only $^
|
2018-12-15 19:13:26 +01:00
|
|
|
|
|
|
|
keyboard.o:keyboard.c
|
2018-12-19 16:13:47 +01:00
|
|
|
$(CC) -mgeneral-regs-only $^
|
2018-12-15 19:13:26 +01:00
|
|
|
|
|
|
|
mouse.o:mouse.c
|
2018-12-19 16:13:47 +01:00
|
|
|
$(CC) -mgeneral-regs-only $^
|
2018-12-15 19:13:26 +01:00
|
|
|
|
|
|
|
syscall.o:syscall.c
|
|
|
|
$(CC) -fomit-frame-pointer $^
|
2007-04-02 16:14:40 +02:00
|
|
|
.o: .c
|
|
|
|
$(CC) $^
|
2018-09-27 17:12:12 +02:00
|
|
|
|
2007-04-02 14:52:01 +02:00
|
|
|
clean:
|
2018-12-12 12:31:30 +01:00
|
|
|
$(REMOVE) *.o
|
|
|
|
$(REMOVE) *.c~
|
|
|
|
$(REMOVE) */*.c~
|
|
|
|
$(REMOVE) ../include/*.h~
|
2018-12-20 16:29:04 +01:00
|
|
|
$(REMOVE) ./TEST/*.c
|
2020-09-17 09:52:56 +02:00
|
|
|
$(SYNC)
|
2007-04-02 14:52:01 +02:00
|
|
|
|
2018-12-12 12:31:30 +01:00
|
|
|
indent:
|
|
|
|
$(CHANGEPERM) *.c
|
|
|
|
$(CONVERT) *.c
|
|
|
|
$(INDENT) *.c
|
2018-12-12 12:37:19 +01:00
|
|
|
$(REMOVE) *.c~
|
2018-12-12 12:31:30 +01:00
|
|
|
$(CHANGEPERM) ./*/*.c
|
|
|
|
$(CONVERT) ./*/*.c
|
|
|
|
$(INDENT) ./*/*.c
|
2018-12-12 12:37:19 +01:00
|
|
|
$(REMOVE) */*.c~
|
2018-12-12 12:31:30 +01:00
|
|
|
$(CHANGEPERM) ../include/*.h
|
|
|
|
$(CONVERT) ../include/*.h
|
|
|
|
$(INDENT) ../include/*.h
|
2018-12-12 12:37:19 +01:00
|
|
|
$(REMOVE) ../include/*.h~
|
2020-09-17 09:52:56 +02:00
|
|
|
$(SYNC)
|
|
|
|
|