summaryrefslogtreecommitdiff
path: root/lib/libgfx/Makefile
blob: 1f866ac73c53a097ca1af7194ec20456c9d91f68 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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/