git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6861 c06c8d41-db1a-0410-9941-cceddc491573
5HRXXWHM5JHDZBCSUD65GYSQIFRD77DYV5PDAJZU4JTE4ZPH3LQAC DSEHSGOZ75YFYOVHTBE7JKA26A6ZFRSF7CYVBBPNGE7SZEZPSDJAC LS2I5I4QF7QABQ6ZD5YFYIN2H5DPBJNPZMUSOM6ASSCY3C4RLOXAC HBXWZNXAJ7LUX7FYUIHQYBTRMWVJC6CAQQL3NNZHK5ETLIFEZJ7QC 25CH7HH4LKXFIZ75YNMXS3TSXO6O27DYSOPLOD45K4OCNFWLS4LQC Q3B3UVMYEVC4YJUPYVSNTR4DJH4E6J4JJDHZNT5LNOCHCPPMEMXAC STQDS62PD6PCLYBAB7LPYTG47WMBJP3FIJL55UHC3XFDPGERC3UQC BGPUXHZ2FDUKA6LAFNBDQJOT3XQGTZQDYBPU7Z6H5HTXZK2EG2BAC L2BH25YQXSIQ7B66SXO7Q3IWUFVX7HTERRJZ5ZJJZS54ZETVFP6AC HEADERS = \tiledef.h \tiledef-p.h \tilep-cmt.h \tiledef-dngn.h \tilecount-dngn.h \map.htm
INPUTS := main dngn player demonINPUTFILES := $(INPUTS:%=dc-%.txt)HEADERS := $(INPUTS:%=tiledef-%.h)SOURCE := $(INPUTS:%=tiledef-%.cc)IMAGES := $(INPUTS:%=%.png)
all: tools tilestools: $(TOOLS)tiles: $(TILEBMP) $(TILEPNG)########################################################################### Tools## Note: dcreverse is not built by default. It does the opposite# of dctile. It takes a bitmap with lots of tiles, specifies regions,# and cuts them out into smaller pieces. It's useful only for when somebody# updates the tiles directly and then doesn't give you the source files.#depend: $(OBJECTS:.o=.c)@for i in $^; do \$(CC) -c $$idcpl.exe: $(SRC)\dcpl.o $(SRC)\bm.o$(CC) $(SRC)\dcpl.o $(SRC)\bm.o -o dcpldctile.exe: $(SRC)\dctile.o $(SRC)\bm.o$(CC) $(SRC)\dctile.o $(SRC)\bm.o -o dctiledcreverse.exe: $(SRC)\dcreverse.o $(SRC)\bm.o$(CC) $(SRC)\dcreverse.o $(SRC)\bm.o -o dcreverse########################################################################### Bitmaps## NOTE: the dependencies here aren't fantastic. In an ideal world,# there would be another tool elf that could read an input text file# and then output the .bmp and .txt dependencies for it. It's kind# of a low priority though, as tiles will be rebuilt infrequently.tile.bmp: dc-2d.txt dctile.exe./dctile dc-2d.txtplayer.bmp: dc-pl.txt dcpl.exe./dcpl dc-pl.txtdngn.bmp: dngn.txt dctile.exe./dctile dngn.txt########################################################################### PNG Conversion#$(B2PTOOL):pushd $(B2PSRC) && $(MAKE) -f makefile.lin bmp2png && popd%.png: %.bmp $(B2PTOOL)$(DELETE) $@$(B2PTOOL) -Q $<########################################################################### Cleaning...#clean:$(DELETE) $(OBJECTS)$(DELETE) $(ALLTOOLS)#pushd $(B2PSRC) && $(MAKE) -f makefile.mgw clean && popd
.cc.o:${CXX} ${CFLAGS} -c $< -o $@