Commit d5b4ff70 authored by Josh Kunz's avatar Josh Kunz

Fixes Makefile

parent 5bc96aef
......@@ -4,11 +4,25 @@
## ##
############################
CC = cc
all:
$(CC) -c src/cap.c src/cptr_cache.c src/grant_cap.c -I ./include/
ar -cvq ./lib/libcap.a cap.o cptr_cache.o grant_cap.o
.PHONY: default clean
CC = cc
CFLAGS = -I./include
headers = $(wildcard include/*)
sources = $(wildcard src/*)
objects = $(patsubst %.c,%.o,$(sources))
lib = ./lib/libcap.a
default: $(lib)
%.o: %.c $(headers)
$(CC) $(CFLAGS) -o $@ -c $<
$(lib): $(objects)
ar -cvq $@ $^
clean:
rm ./lib/libcap.a
rm *.o
-rm -f $(lib)
-rm -f $(objects)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment