bin/data/ottd_grf/Makefile
branchNewGRF_ports
changeset 6871 5a9dc001e1ad
equal deleted inserted replaced
6870:ca3fd1fbe311 6871:5a9dc001e1ad
       
     1 # Some configurational settings for your environment.
       
     2 GRFCODEC := grfcodec
       
     3 RENUM    := renum
       
     4 # Remove the @ when you want a more verbose output.
       
     5 V        := @
       
     6 
       
     7 # Some "should not be changed" settings.
       
     8 NAME         := openttd
       
     9 NFO_FILES    := split/*.nfo
       
    10 PCX_FILES    := split/*.pcx
       
    11 
       
    12 # Build both GRFs by default.
       
    13 all: $(NAME)d.grf $(NAME)w.grf
       
    14 
       
    15 # Make sure the sprites directory exists.
       
    16 sprites:
       
    17 	$(V)-mkdir "$@"
       
    18 
       
    19 # DOS file.
       
    20 $(NAME)d.grf: $(PCX_FILES) $(NFO_FILES) sprites
       
    21 	$(V)-cp $(PCX_FILES) sprites 2> /dev/null
       
    22 	$(V) gcc -DDOS -Isplit -C -E - < "split/$(NAME).nfo" | sed -e '/^#/d' -e '/^$$/d' > sprites/$(NAME)d.nfo
       
    23 	$(V) $(GRFCODEC) -e -m1 $@
       
    24 	$(V) rm -f $(@:grf=bak)
       
    25 
       
    26 # Windows file.
       
    27 $(NAME)w.grf: $(PCX_FILES) $(NFO_FILES) sprites
       
    28 	$(V)-cp $(PCX_FILES) sprites 2> /dev/null
       
    29 	$(V) gcc -Isplit -C -E - < "split/$(NAME).nfo" | sed -e '/^#/d' -e '/^$$/d' > sprites/$(NAME)w.nfo
       
    30 	$(V) $(GRFCODEC) -e -p2 $@
       
    31 	$(V) rm -f $(@:grf=bak)
       
    32 
       
    33 # Clean up temporary files.
       
    34 clean:
       
    35 	$(V)rm -f *.bak $(PREPROCESSED)
       
    36 	$(V)rm -fr sprites
       
    37 
       
    38 # Clean up temporary files and result of generation, i.e. the grfs.
       
    39 mrproper: clean
       
    40 	$(v)rm -f $(NAME)d.grf $(NAME)w.grf