diff options
Diffstat (limited to 'lib/libgfx/Makefile')
-rw-r--r-- | lib/libgfx/Makefile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/libgfx/Makefile b/lib/libgfx/Makefile new file mode 100644 index 0000000..1f866ac --- /dev/null +++ b/lib/libgfx/Makefile @@ -0,0 +1,30 @@ +CFLAGS = -c -fno-stack-protector -nostdlib -static \ + -Iinclude/ -I$(USRDIR)/include/ +CFILES = $(shell find src/ -name "*.c") +OBJ = $(CFILES:.c=.o) + +all: headers $(OBJ) build/libgfx.a + echo "----------------------------------------" + echo $(USRDIR) + mv build/libgfx.a $(USRDIR)/lib/ + cp -r include/ $(USRDIR)/include/ + +build/libgfx.a: + mkdir -p build/ + ar rcs build/libgfx.a $(OBJ) + +%.o: %.c + $(CC) $(CFLAGS) -Iinclude/ $< -o $@ + +.PHONY: headers +headers: + cp -rf include/* $(USRDIR)/include/ + +.PHONY: +build/: + mkdir -p build/ + +.PHONY: clean +clean: + rm -f $(OBJ) + rm -rf build/ |