dmrconfig/Makefile-mingw

42 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-09-05 23:47:57 -07:00
CC = gcc
VERSION = 0.7
2018-09-05 23:47:57 -07:00
GITCOUNT = $(shell git rev-list HEAD --count)
2018-09-07 21:12:21 -07:00
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
2018-09-05 23:47:57 -07:00
LDFLAGS = -g -s
2018-09-06 12:10:01 -07:00
OBJS = main.o util.o radio.o dfu-windows.o uv380.o md380.o
2018-09-07 21:12:21 -07:00
LIBS = -lsetupapi
2018-09-05 23:47:57 -07:00
# Compiling Windows binary from Linux
ifeq (/usr/bin/i586-mingw32msvc-gcc,$(wildcard /usr/bin/i586-mingw32msvc-gcc))
CC = i586-mingw32msvc-gcc
endif
ifeq (/usr/bin/i686-w64-mingw32-gcc,$(wildcard /usr/bin/i686-w64-mingw32-gcc))
CC = i686-w64-mingw32-gcc
endif
2018-09-08 14:34:52 -07:00
# Compiling Windows binary from Mac OS
ifeq (/usr/local/bin/i686-w64-mingw32-gcc,$(wildcard /usr/local/bin/i686-w64-mingw32-gcc))
CC = i686-w64-mingw32-gcc
endif
2018-09-05 23:47:57 -07:00
all: dmrconfig.exe
dmrconfig.exe: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f *~ *.o core dmrconfig
install: dmrconfig
install -c -s dmrconfig /usr/local/bin/dmrconfig
###
2018-09-06 12:10:01 -07:00
dfu-windows.o: dfu-windows.c util.h
2018-09-05 23:47:57 -07:00
main.o: main.c radio.h util.h
md380.o: md380.c radio.h util.h
radio.o: radio.c radio.h util.h
util.o: util.c util.h
uv380.o: uv380.c radio.h util.h