forked from asdfugil/cpufreq_module
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
21 lines (15 loc) · 699 Bytes
/
Copy pathMakefile
File metadata and controls
21 lines (15 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PONGO_SRC ?= ../PongoOS
CC ?= clang -arch arm64
CFLAGS += -I$(PONGO_SRC)/include -I$(PONGO_SRC)/src/kernel -I$(PONGO_SRC)/newlib/aarch64-none-darwin/include -Iinclude -I$(PONGO_SRC)/apple-include
CFLAGS += -I$(PONGO_SRC)/src/drivers -Oz -ffreestanding -nostdlib -U__nonnull -DTARGET_OS_OSX=0 -DTARGET_OS_MACCATALYST=0 -D_GNU_SOURCE -DDER_TAG_SIZE=8
CFLAGS += -fvisibility=hidden
LDFLAGS += -Wl,-kext -Wl,-dead_strip -flto=full -fno-stack-protector
all: cpufreq
obj/%.o: src/%.c
$(CC) -c -nostdlibinc $(CFLAGS) $< -o $@
cpufreq: $(patsubst src/%.c, obj/%.o, $(wildcard src/*.c))
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o cpufreq
format:
clang-format -i src/*.c src/*.h
clean:
rm -f cpufreq obj/*.o