~nerosnm/oslog

ref: 0e3d740f4b1730db51f26624a578323091660a7c oslog/os_log_wrapper/Makefile -rw-r--r-- 545 bytes
0e3d740f — Søren Mortensen Wrapper library allows actually calling into os_log 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 = os_log_wrapper.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))

ODIR=obj

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

SDIR=src

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

OUTDIR=out

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

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

.PHONY: clean

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

all: liboslogwrapper.a