]> git.zerfleddert.de Git - proxmark3-svn/blame_incremental - client/Makefile
merge makefiles into one
[proxmark3-svn] / client / Makefile
... / ...
CommitLineData
1WINCC=c:\mingw\bin\gcc
2
3#COMMON_FLAGS = -m32
4LDLIBS = -L/opt/local/lib -L/usr/local/lib -lusb -lreadline -lpthread
5LDFLAGS = $(COMMON_FLAGS)
6CFLAGS = -I. -I/opt/local/include -Wall -Wno-unused-function $(COMMON_FLAGS)
7
8WINLIBS = -lgdi32 -lsetupapi
9#CXXFLAGS = $(shell pkg-config --cflags QtCore QtGui 2>/dev/null) -Wall -arch i386 -D_
10#QTLDLIBS = $(shell pkg-config --libs QtCore QtGui 2>/dev/null) -arch i386
11
12ifneq ($(QTLDLIBS),)
13QTGUI = proxgui.o proxguiqt.o proxguiqt.moc.o
14CFLAGS += -DHAVE_GUI
15MOC = $(shell type moc-qt4 >/dev/null 2>&1 && echo moc-qt4 || echo moc)
16LINK.o = $(LINK.cpp)
17else
18QTGUI = guidummy.o
19endif
20
21ifeq ($(shell echo ""),)
22RM = rm -f
23BINS = proxmark3 snooper cli flasher
24CLEAN = cli flasher proxmark3 snooper *.o *.moc.cpp
25else
26RM = del
27BINS = prox.exe
28CLEAN = prox.exe
29endif
30
31all: $(BINS)
32
33all-static: LDLIBS:=-static $(LDLIBS)
34all-static: snooper cli flasher
35
36prox.exe: prox.c wingui.c command.c
37 $(WINCC) $(CFLAGS) $(DEFINES) -o prox.exe prox.c wingui.c command.c $(WINLIBS)
38
39proxmark3: LDLIBS+=$(QTLDLIBS)
40proxmark3: proxmark3.o gui.o command.o usb.o $(QTGUI)
41
42command.o: command.c
43
44snooper: snooper.o gui.o command.o usb.o guidummy.o
45
46cli: cli.o gui.o command.o usb.o guidummy.o
47
48flasher: flasher.o usb.o
49
50proxguiqt.moc.cpp: proxguiqt.h
51 $(MOC) -o$@ $^
52
53clean:
54 $(RM) $(CLEAN)
55
56.PHONY: all clean
Impressum, Datenschutz