dmrconfig/Makefile-mingw

52 lines
1.5 KiB
Plaintext
Raw Permalink Normal View History

CC = gcc
2018-09-05 23:47:57 -07:00
2018-09-15 15:43:23 -07:00
VERSION = $(shell git describe --tags --abbrev=0)
2018-09-05 23:47:57 -07:00
GITCOUNT = $(shell git rev-list HEAD --count)
CFLAGS = -g -O -Wall -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
LDFLAGS = -g -s
2018-09-05 23:47:57 -07:00
OBJS = main.o util.o radio.o dfu-windows.o uv380.o md380.o rd5r.o \
gd77.o hid.o hid-windows.o serial.o d868uv.o dm1801.o
2018-09-17 21:46:11 -07:00
LIBS = -lhid -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
all: dmrconfig.exe
2018-09-05 23:47:57 -07:00
dmrconfig.exe: $(OBJS)
2018-09-05 23:47:57 -07:00
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f *~ *.o core dmrconfig
install: dmrconfig
2018-09-05 23:47:57 -07:00
install -c -s dmrconfig /usr/local/bin/dmrconfig
###
d868uv.o: d868uv.c radio.h util.h d868uv-map.h
dfu-libusb.o: dfu-libusb.c util.h
2018-09-06 12:10:01 -07:00
dfu-windows.o: dfu-windows.c util.h
2018-10-04 19:51:10 -07:00
gd77.o: gd77.c radio.h util.h
hid.o: hid.c util.h
hid-libusb.o: hid-libusb.c util.h
hid-macos.o: hid-macos.c util.h
hid-windows.o: hid-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
rd5r.o: rd5r.c radio.h util.h
2018-10-13 21:16:03 -07:00
serial.o: serial.c util.h
2018-09-05 23:47:57 -07:00
util.o: util.c util.h
uv380.o: uv380.c radio.h util.h