-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.win
30 lines (23 loc) · 713 Bytes
/
Makefile.win
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
ARCH=ia64
CC=/portable/development/tcc/tcc_$(ARCH)/tcc.exe
SC=/portable/development/devtools/sigcheck.exe
CFLAGS=-DARCH=\"$(ARCH)\" -MD -Wall -c
SHELL=C:/Windows/System32/cmd.exe
SRCPATH=src
BINPATH=bin\$(ARCH)
SOURCES=up42.c walkera.c xor.c serial.c xmodem.c crc16.c gopt.c ini.c tools.c e4c.c ihex.c
OBJECTS=$(SOURCES:%.c=$(BINPATH)/%.o)
DEP=$(OBJECTS:.o=.d)
-include $(DEP)
EXECUTABLE=$(BINPATH)/up42.exe
.PHONY: all clean prepare
all: prepare $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@
# $(SC) -q -a $@
$(BINPATH)/%.o: $(SRCPATH)/%.c
$(CC) $(CFLAGS) $< -o $@
prepare:
-@mkdir "$(BINPATH)" >nul 2>&1 || echo.
clean:
-@rmdir /Q /S "$(BINPATH)" >nul 2>&1 || echo.