-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
35 lines (27 loc) · 799 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
PROGNAME=sosi2osm
OBJFILES=sosi2osm.o sosi.o tag.o node.o
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
# Mac settings
LUA = lua
LDFLAGS += -liconv
else
LUA = lua5.1-c++
endif
CPPFLAGS := $(CPPFLAGS) `pkg-config --cflags $(LUA) fyba` -DLINUX -DUNIX -g
LDFLAGS := $(LDFLAGS) -lproj `pkg-config --libs $(LUA) fyba` -lfyut -lfygm
all: $(PROGNAME)
clean:
$(RM) $(PROGNAME) $(OBJFILES) *~
$(PROGNAME): $(OBJFILES)
$(CXX) $^ $(LDFLAGS) -o $@
install: sosi2osm
install -m 0755 sosi2osm /usr/local/bin
mkdir -p /usr/local/share/sosi2osm/lua
install -m 0644 lua/*.lua /usr/local/share/sosi2osm/lua
uninstall:
rm /usr/local/share/sosi2osm/lua/*.lua
rmdir /usr/local/share/sosi2osm/lua
rmdir /usr/local/share/sosi2osm
rm /usr/local/bin/sosi2osm
.PHONY: install uninstall clean all