-
Notifications
You must be signed in to change notification settings - Fork 12
/
Make-mingw
36 lines (30 loc) · 1018 Bytes
/
Make-mingw
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
CC = gcc -m32
VERSION = 1.6
GITCOUNT = $(shell git rev-list HEAD --count)
CFLAGS = -g -O -Wall -DMINGW32 -Werror -DVERSION='"$(VERSION).$(GITCOUNT)"'
LDFLAGS = -s
OBJS = main.o util.o radio.o uv-5r.o uv-b5.o bf-888s.o bf-t1.o
LIBS =
# 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
ifeq (/usr/local/bin/i686-w64-mingw32-gcc,$(wildcard /usr/local/bin/i686-w64-mingw32-gcc))
CC = i686-w64-mingw32-gcc
endif
all: baoclone.exe
baoclone.exe: $(OBJS)
$(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
clean:
rm -f *.o *.exe
###
bf-888s.o: bf-888s.c radio.h util.h
bf-t1.o: bf-t1.c radio.h util.h
main.o: main.c radio.h util.h
radio.o: radio.c radio.h util.h
util.o: util.c util.h
uv-5r.o: uv-5r.c radio.h util.h
uv-b5.o: uv-b5.c radio.h util.h