# This file is part of icobundle # Copyright (C) 2003-7 Toby Thain, toby@telegraphics.com.au # 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 2 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, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # GNU Makefile # Win32 cross-compiler MINGW_CC = i386-mingw32msvc-gcc CFLAGS += -O2 -W -Wall -I../common/tt -I../icoformat -DCMDLINE DISTARCHIVE = icobundle-dos.zip SRC = file_io.c file_compat_unix.c ico_io.c vpath %.c ../common/tt ../icoformat OBJ := $(patsubst %.c,obj/%.o,$(SRC)) OBJW32 := $(patsubst %.c,obj_w32/%.o,$(SRC)) all : icocheck icobundle exe : icocheck.exe icobundl.exe $(DISTARCHIVE) : dist/README.html COPYING icocheck.exe icobundl.exe zip -j -9 $@ $^ ls -l $@ clean : rm -f icocheck icobundle icocheck.exe icobundl.exe obj/*.o obj_w32/*.o $(DISTARCHIVE) icocheck : obj/icocheck.o $(OBJ) $(CC) -o $@ $^ -s icobundle : obj/icobundle.o obj/bundle.o $(OBJ) $(CC) -o $@ $^ -s icocheck.exe : obj_w32/icocheck.o $(OBJW32) $(MINGW_CC) -o $@ $^ -s icobundl.exe : obj_w32/icobundle.o obj_w32/bundle.o $(OBJW32) $(MINGW_CC) -o $@ $^ -s dist : $(DISTARCHIVE) obj/%.o : %.c $(CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS) obj_w32/%.o : %.c $(MINGW_CC) -o $@ -c $< $(CFLAGS) $(CPPFLAGS)