2017-10-18 02:08:32 +02:00
|
|
|
FASM=fasm
|
2018-04-23 12:09:46 +02:00
|
|
|
CC=gcc
|
2019-10-22 04:24:44 +02:00
|
|
|
WARNINGS=-Wall -Wextra -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -Wnull-dereference -Wjump-misses-init -Wshadow -Wformat=2 -Wswitch -Wswitch-enum #-Wconversion -Wsign-conversion
|
|
|
|
CFLAGS=$(WARNINGS) -g -O0 -D_FILE_OFFSET_BITS=64 -Wno-address-of-packed-member
|
2019-10-13 03:17:29 +02:00
|
|
|
CFLAGS_32=-m32
|
2018-05-09 23:08:52 +02:00
|
|
|
LDFLAGS=
|
|
|
|
LDFLAGS_32=-m32
|
2017-10-18 02:08:32 +02:00
|
|
|
|
2019-10-09 01:35:47 +02:00
|
|
|
all: kofu kofuse kolibri.sym kolibri.lst tools/mkdirrange tools/mkfilepattern
|
2017-10-18 02:08:32 +02:00
|
|
|
|
2019-10-13 03:17:29 +02:00
|
|
|
kofu: kofu.o kolibri.o trace.o trace_lbr.o trace_lwp.o cio.o
|
2019-10-09 01:35:47 +02:00
|
|
|
$(CC) $(LDFLAGS) $(LDFLAGS_32) $^ -o $@ -static
|
2017-10-18 02:08:32 +02:00
|
|
|
|
2019-10-13 03:17:29 +02:00
|
|
|
kofuse: kofuse.o kolibri.o cio.o
|
2018-05-09 23:08:52 +02:00
|
|
|
$(CC) $(LDFLAGS) $(LDFLAGS_32) $^ -o $@ `pkg-config fuse3 --libs`
|
2017-10-18 22:19:53 +02:00
|
|
|
|
2019-10-09 01:35:47 +02:00
|
|
|
kolibri.o kolibri.fas: kolibri.asm kolibri.h
|
2019-10-21 04:51:56 +02:00
|
|
|
INCLUDE="$(KOLIBRI_TRUNK);$(LIBCRASH_X86)" $(FASM) $< $@ -s kolibri.fas
|
2019-10-09 01:35:47 +02:00
|
|
|
|
|
|
|
kolibri.sym: kolibri.fas
|
|
|
|
symbols kolibri.fas kolibri.sym
|
|
|
|
|
|
|
|
kolibri.lst: kolibri.fas
|
|
|
|
listing kolibri.fas kolibri.lst
|
|
|
|
|
|
|
|
trace.o: trace.c trace.h trace_lbr.h
|
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_32) -c $<
|
|
|
|
|
|
|
|
trace_lbr.o: trace_lbr.c trace_lbr.h kolibri.h
|
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_32) -c $<
|
|
|
|
|
|
|
|
trace_lwp.o: trace_lwp.c trace_lwp.h kolibri.h
|
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_32) -c $<
|
2017-10-18 02:08:32 +02:00
|
|
|
|
2019-10-13 03:17:29 +02:00
|
|
|
cio.o: cio.c
|
2018-05-09 23:08:52 +02:00
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_32) -c $<
|
2017-10-18 02:08:32 +02:00
|
|
|
|
2019-10-13 03:17:29 +02:00
|
|
|
kofu.o: kofu.c kolibri.h trace.h
|
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_32) -c $< -std=c99
|
|
|
|
|
2018-05-09 23:08:52 +02:00
|
|
|
kofuse.o: kofuse.c kolibri.h
|
2019-10-13 03:17:29 +02:00
|
|
|
$(CC) $(CFLAGS) $(CFLAGS_32) `pkg-config fuse3 --cflags` -c $< -std=gnu99
|
2018-05-09 23:08:52 +02:00
|
|
|
|
|
|
|
tools/mkdirrange: tools/mkdirrange.c
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
2017-10-18 02:08:32 +02:00
|
|
|
|
2018-06-18 03:55:51 +02:00
|
|
|
tools/mkfilepattern: tools/mkfilepattern.c
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
|
|
|
|
|
2017-10-18 22:19:53 +02:00
|
|
|
.PHONY: all clean
|
2017-10-18 02:08:32 +02:00
|
|
|
|
|
|
|
clean:
|
2019-10-22 04:24:44 +02:00
|
|
|
rm -f *.o kofu kofuse kolibri.fas kolibri.sym kolibri.lst kolibri.prp coverage tools/mkdirrange tools/mkfilepattern
|
2017-10-18 02:08:32 +02:00
|
|
|
|