forked from 96boards/uim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (34 loc) · 810 Bytes
/
Makefile
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
40
41
42
43
44
45
46
MAKEFLAGS += --no-print-directory
PREFIX ?= /usr
SBINDIR ?= $(PREFIX)/sbin
MANDIR ?= $(PREFIX)/share/man
MKDIR ?= mkdir -p
INSTALL ?= install
CC ?= "gcc"
CFLAGS ?= -O2 -g
CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
OBJS = uim.o
ALL = uim
ifeq ($(V),1)
Q=
NQ=true
else
Q=@
NQ=echo
endif
all: $(ALL)
VERSION_OBJS := $(filter-out version.o, $(OBJS))
%.o: %.c uim.h
@$(NQ) ' CC ' $@
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
uim: $(OBJS)
@$(NQ) ' CC ' uim
$(Q)$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o uim
check:
$(Q)$(MAKE) all CC="REAL_CC=$(CC) CHECK=\"sparse -Wall\" cgcc"
install: uim
@$(NQ) ' INST uim'
$(Q)$(MKDIR) $(DESTDIR)$(SBINDIR)
$(Q)$(INSTALL) -m 755 -t $(DESTDIR)$(SBINDIR) uim
clean:
$(Q)rm -f uim *.o *~