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