forked from cblach/nikola-v2gstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 619 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (27 loc) · 619 Bytes
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
37
38
39
CC=clang
AR=ar
MAKE=make
CFLAGS=-g -Os -Wall -pedantic
PREFIX=/usr/local
LIBDIR=$(PREFIX)/lib
INCDIR=$(PREFIX)/include
TARGET=libnikolav2g.a
HEADER=nikolav2g.h
SOURCES=$(wildcard *.c)
OBJECTS=$(SOURCES:.c=.o)
all: lib example
lib: $(TARGET)
example: lib
$(MAKE) -C example
$(TARGET): $(OBJECTS)
$(AR) rcs $(TARGET) $(OBJECTS)
$(OBJECTS): $(HEADER)
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
install: $(TARGET)
install -D $(TARGET) $(DESTDIR)$(LIBDIR)/$(TARGET)
install -D $(HEADER) $(DESTDIR)$(INCDIR)/$(HEADER)
clean:
rm -f $(OBJECTS) $(TARGET)
$(MAKE) -C example clean
.PHONY: all lib example install clean