1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00
rufus/mkf
Pete Batard 52a2b4b584 [mingw] improved automake/autoconf files
* also renamed standalone makefile from mf to mkf
* also added release step, with UPX compression and digital signing of the exe
2011-12-05 00:04:01 +00:00

53 lines
1.7 KiB
Text

# Rufus STANDALONE Makefile - invoke with "make -f mf"
# This file is part of the Rufus project.
#
# Copyright (c) 2011 Pete Batard <pbatard@akeo.ie>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
OBJECTS = fat12.o fat16.o fat32.o br.o file.o drive.o msdos.o format.o stdio.o stdlg.o rufus.o
TARGET = rufus
CC = gcc
RC = windres
STRIP = strip
CFLAGS = -DWINVER=0x501 -D_WIN32_IE=0x501 -I./inc -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow
LDFLAGS = -O2 -Wall -Wl,--subsystem,windows
LIBS = -lsetupapi -lole32 -lgdi32
.PHONY: all clean
all: $(TARGET)
$(TARGET): $(OBJECTS) $(TARGET)_rc.o
@echo "[CCLD] $@"
@$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(TARGET)_rc.o $(LIBS)
%.o: %.c
@echo "[CC] $@"
@$(CC) -c -o $*.o $(CFLAGS) $<
%_rc.o: %.rc
@echo "[RC] $@"
@$(RC) -i $< -o $@
clean:
rm -f *.exe *.o
# This step produces the UPX compressed and signed release that is made available for public download
release: $(TARGET)
@$(STRIP) $(TARGET).exe
@upx $(TARGET).exe
@cmd.exe /k _sign.bat rufus.exe