forked from stefanklug/uvncrepeater
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
54 lines (42 loc) · 1.14 KB
/
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
47
48
49
50
51
52
53
54
PACKAGE = uvncrepeater
VERSION = 1.0.0
DESTDIR =
prefix = /usr/local
CC = gcc
LD = gcc
CFLAGS = -W -Wall # -ansi -D_XOPEN_SOURCE=500
LDFLAGS =
OPT = -O2
OBJS = repeater.o repeaterproc.o openbsd_stringfuncs.o iniparser.o readini.o repeaterevents.o in46_addr.o
SHELL = /bin/bash
ifeq ($(V), 1)
THECC = $(CC)
THELD = $(LD)
VERBOSE =
else
THECC = @echo " CC $@"; $(CC)
THELD = @echo " LINK $@"; $(LD)
VERBOSE = @
endif
all: repeater
debug: CFLAGS += -DDEBUG -ggdb
debug: OPT = -O0
debug: all
release: CFLAGS += -DNDEBUG
release: all
CFLAGS += $(OPT) -DREPEATER_VERSION=\"$(VERSION)\"
repeater: $(OBJS)
$(THELD) $(LDFLAGS) -o $@ $(OBJS)
%.o: %.c
$(THECC) $(CFLAGS) -c $< -o $@
install: all
$(VERBOSE)mkdir -p $(DESTDIR)$(prefix)/bin
$(VERBOSE)mkdir -p $(DESTDIR)/etc
$(VERBOSE)cp -f repeater $(DESTDIR)$(prefix)/bin/$(PACKAGE)
$(VERBOSE)if ! [ -f $(DESTDIR)/etc/$(PACKAGE).ini ]; then cp uvncrepeater.ini $(DESTDIR)/etc/$(PACKAGE).ini; fi
clean:
$(VERBOSE)rm -f *.o repeater $(PACKAGE)-$(VERSION).tar.bz2
tarball:
tar --files-from=files.lst \
--transform='s,^,$(PACKAGE)-$(VERSION)/,S' \
-cjf $(PACKAGE)-$(VERSION).tar.bz2