~nerosnm/oslog

ref: f0e0a1169d79e24e4e38008387fbb6bb3dfd7374 oslog/liboslog/Makefile -rw-r--r-- 504 bytes
f0e0a116 — Søren Mortensen Rename to oslog and cleaner structure 3 years ago
                                                                                
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
31
32
33
34
35
36
CC=clang
CFLAGS=-I$(IDIR)

IDIR=include

_DEPS = oslog.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))

ODIR=obj

_OBJ = oslog.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))

SDIR=src

_SRC = oslog.c
SRC = $(patsubst %,$(SDIR)/%,$(_SRC))

OUTDIR=out

$(ODIR)/%.o: $(SDIR)/%.c $(DEPS)
	@echo "[Compile]" $<
	@$(CC) -c -o $@ $< $(CFLAGS)

$(OUTDIR)/liboslog.a: $(OBJ)
	@echo "[Link (Static)]" $<
	@mkdir -p $(OUTDIR)
	@ar rcs $@ $^

.PHONY: clean

clean:
	rm -f $(ODIR)/*.o *~ $(INCDIR)/*~
	rm -rf out

all: liboslog.a