aboutsummaryrefslogtreecommitdiffstats
path: root/icepack/Makefile
blob: cfe48be57d36741578ce2cb827d27ff35614b553 (plain)
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
include ../config.mk
LDLIBS = -lm -lstdc++
CXXFLAGS = -MD -O0 -ggdb -Wall -std=c++11 -I/usr/local/include
MXEGCC = /usr/local/src/mxe/usr/bin/i686-pc-mingw32-gcc

ifeq ($(STATIC),1)
LDFLAGS += -static
endif

all: icepack$(EXE) iceunpack$(EXE)

icepack$(EXE): icepack.o
	$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)

iceunpack: icepack
	ln -sf icepack iceunpack

iceunpack.exe:
	# no iceunpack.exe, use icepack -u

install: all
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	cp icepack $(DESTDIR)$(PREFIX)/bin/icepack
	ln -sf icepack $(DESTDIR)$(PREFIX)/bin/iceunpack

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/icepack
	rm -f $(DESTDIR)$(PREFIX)/bin/iceunpack

clean:
	rm -f icepack
	rm -f iceunpack
	rm -f icepack.exe
	rm -f *.o *.d

-include *.d

.PHONY: all install uninstall clean