############################################################### # # Makefile for MiniImage # # Targets: # all - build and install # clean - clean everything # check - run self-tests # ################################################################### # ==================================================== # Common Make variables for PalmOS executables # ==================================================== # Tools we use CC = m68k-palmos-gcc AS = m68k-palmos-as HS_COMMON_INCS_DIR = $(shell cat includes.txt) $(shell cat platform.txt) -I Rsc HS_PALM_RC_FLAGS = $(HS_COMMON_INCS_DIR) CFLAGS = -O2 -g -Wall $(HS_PALM_RC_FLAGS) LDFLAGS = -g # Directory paths OUTPUTDIR = Obj SRCDIR = Src RSCDIR = Rsc TESTSDIR = Tests RESULTDIR = Result APP = MiniImage RCPFILE=$(RSCDIR)/$(APP).rcp PRCFILE=${RESULTDIR}/${APP}.prc OBJS=$(OUTPUTDIR)/Main.o $(OUTPUTDIR)/Common.o $(OUTPUTDIR)/FileBrowserForm.o $(RESULTDIR)/$(APP).prc: $(OUTPUTDIR) $(RESULTDIR) $(OUTPUTDIR)/$(APP) $(OUTPUTDIR)/bin.stamp $(APP).def $(HUSH)$(CC) $(CFLAGS) $(OBJS) -o $(OUTPUTDIR)/$(APP).code.1.sym build-prc $(APP).def $(OUTPUTDIR)/$(APP) -o ${PRCFILE} $(OUTPUTDIR)/*.bin $(OUTPUTDIR): mkdir ${OUTPUTDIR} $(RESULTDIR): mkdir ${RESULTDIR} $(OUTPUTDIR)/$(APP): $(OBJS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(OUTPUTDIR)/%.o: $(SRCDIR)/Main.c $(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $(SRCDIR)/Main.c -o $(OUTPUTDIR)/Main.o $(CC) $(CFLAGS) -c $(SRCDIR)/Common.c -o $(OUTPUTDIR)/Common.o $(CC) $(CFLAGS) -c $(SRCDIR)/FileBrowserForm.c -o $(OUTPUTDIR)/FileBrowserForm.o $(OBJS): $(SRCDIR)/*.h $(RSCDIR)/*.h $(OUTPUTDIR)/Main.o: $(SRCDIR)/*.h $(RSCDIR)/*.h $(OUTPUTDIR)/bin.stamp: $(RCPFILE) $(OBJS) ( cd $(OUTPUTDIR); rm -f *.bin; pilrc -I ../$(SRCDIR) -I ../$(RSCDIR) ../$(RCPFILE); \ pilrc -I ../$(SRCDIR) -I ../$(RSCDIR) ../$(RSCDIR)/FileBrowserForm.rcp) touch $(OUTPUTDIR)/bin.stamp samples: ${PRCFILE} clean: rm -rf $(OUTPUTDIR) rm -rf ${RESULTDIR}