2011-11-30 19:43:30 +00:00
|
|
|
#
|
|
|
|
# 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/>.
|
|
|
|
#
|
2011-11-20 03:29:08 +00:00
|
|
|
|
2011-12-01 17:54:35 +00:00
|
|
|
OBJECTS = fat12.o fat16.o fat32.o br.o file.o drive.o msdos.o format.o stdio.o stdlg.o rufus.o
|
2011-11-30 19:43:30 +00:00
|
|
|
TARGET = rufus
|
2011-11-21 17:06:17 +00:00
|
|
|
|
2011-11-30 19:43:30 +00:00
|
|
|
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
|
2011-11-20 03:29:08 +00:00
|
|
|
|
2011-11-30 19:43:30 +00:00
|
|
|
.PHONY: all clean
|
2011-11-20 03:29:08 +00:00
|
|
|
|
2011-11-30 19:43:30 +00:00
|
|
|
all: $(TARGET)
|
2011-11-20 03:29:08 +00:00
|
|
|
|
2011-11-30 19:43:30 +00:00
|
|
|
$(TARGET): $(OBJECTS) $(TARGET)_rc.o
|
2011-11-20 03:29:08 +00:00
|
|
|
@echo "[CCLD] $@"
|
2011-11-30 19:43:30 +00:00
|
|
|
@$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(TARGET)_rc.o $(LIBS)
|
|
|
|
@$(STRIP) $(TARGET).exe
|
2011-11-20 03:29:08 +00:00
|
|
|
|
2011-11-30 19:43:30 +00:00
|
|
|
%.o: %.c
|
|
|
|
@echo "[CC] $@"
|
|
|
|
@$(CC) -c -o $*.o $(CFLAGS) $<
|
|
|
|
|
|
|
|
%_rc.o: %.rc
|
2011-11-20 03:29:08 +00:00
|
|
|
@echo "[RC] $@"
|
|
|
|
@$(RC) -i $< -o $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.exe *.o
|