home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2002 July & August
/
PCWorld_2002-07-08_cd.bin
/
Software
/
Vyzkuste
/
batterypanel
/
source
/
Makefile
< prev
next >
Wrap
Makefile
|
2000-10-11
|
2KB
|
68 lines
#==============================================================================
# $Id: Makefile,v 1.2 2000/04/18 20:58:00 unknown Exp unknown $
#==============================================================================
NAME = batterypanel
DBNAME = "Bttr-Panel"
CREATOR = Bttr
VERSION = 0
MINOR = 02
HEADER = rsrc.h rsrcfix.h
OBJECTS = main.o
BITMAPS = full.bmp empty.bmp
SHELL = /bin/sh
BIN = /usr/palm/bin
CC = $(BIN)/m68k-palmos-coff-gcc
CFLAGS = -Wall -ggdb -O2
OBJRES = $(BIN)/m68k-palmos-coff-obj-res
BUILDPRC = $(BIN)/build-prc
PILRC = $(BIN)/pilrc
#------------------------------------------------------------------------------
all: $(NAME)_en.prc
main.o: main.c $(HEADER)
# build the prc
$(NAME)_en.prc: en/tAIN03e8.bin en/code0000.$(NAME).grc
cd en && $(BUILDPRC) -t panl ../$(NAME)_en.prc $(DBNAME) $(CREATOR) *.grc *.bin
cd de && $(BUILDPRC) -t panl ../$(NAME)_de.prc $(DBNAME) $(CREATOR) *.grc *.bin
ls -l en/code0001.* *.prc
# link objects and generate code resources (.grc)
en/code0000.$(NAME).grc: $(OBJECTS)
-rm */*.grc
$(CC) $(CFLAGS) -o $(NAME) $(OBJECTS)
$(OBJRES) $(NAME)
cp *.grc en
mv *.grc de
# generate resources (.bin)
# and patch the version resource
en/tAIN03e8.bin: rsrc.rcp $(BITMAPS)
-rm */*.bin
$(PILRC) -L EN -h rsrc.h rsrc.rcp en
$(PILRC) -L DE -h rsrc.h rsrc.rcp de
perl -e 'print "$(VERSION).$(MINOR)\0"' >en/tver0001.bin
cp en/tver0001.bin de/tver0001.bin
# compile a module
.c.o:
$(CC) $(CFLAGS) -c -o $*.o $*.c
# nuke the non-source files (and emacs backups)
clean:
-rm */*.bin */*.grc *~ *.o $(NAME)
# make the distribution zip file
zip: all clean
-rm ../$(NAME)$(VERSION)$(MINOR).zip ../*.HTM ../*.TXT
cp *.HTM *.TXT ..
mv *.prc ..
cd .. && zip $(NAME)$(VERSION)$(MINOR).zip *.HTM *.TXT *.prc source/*
#==============================================================================