Fixed Makefile (detects files with wildcards) and renamed images.

This commit is contained in:
Black Rook 2017-01-29 10:55:53 +01:00
parent c1fc4a589e
commit 5e4e4adf66
5 changed files with 8 additions and 8 deletions

View File

@ -4,26 +4,26 @@ include $(CURDIR)/Makefile.config
# DEDUCED VARS
ALLOBJ = $(patsubst %,$(OBJDIR)/%.o,$(SRC) $(IMG))
ALLINC = $(INC:%=$(INCDIR)/%.h)
ALLINC = $(INC:%=$(INCDIR)/%)
# RULES
## Make it all (default rule)
all: $(NAME).g1a
## Compile sprites
$(OBJDIR)/%.o: $(IMGDIR)/%.bmp
fxconv $< -o $@ -n $(<:$(IMGDIR)/%.bmp=img_%)
$(OBJDIR)/%.bmp.o: $(IMGDIR)/%.bmp
fxconv $< -o $@ -n $(patsubst %.bmp,img_%,$(notdir $<))
## Make the object directory
$(OBJDIR):
mkdir -p $(OBJDIR)
## Make an object file out of an ASM source file
$(OBJDIR)/%.o: $(SRCDIR)/%.s
$(OBJDIR)/%.s.o: $(SRCDIR)/%.s
$(AS) -c -o $@ $<
## Make an object file out of a C source file
$(OBJDIR)/%.o: $(SRCDIR)/%.c $(ALLINC)
$(OBJDIR)/%.c.o: $(SRCDIR)/%.c $(ALLINC)
$(CC) -c -o $@ $< $(CFLAGS)
## Make the ELF file

View File

@ -35,12 +35,12 @@ WRAPR = g1a-wrapper
SENDR = p7
# SOURCES
SRC = voiture\
SRC = $(notdir $(wildcard $(SRCDIR)/*.[cs]))
# INCLUDES
INC = voiture\
INC = $(notdir $(wildcard $(INCDIR)/*.h))
# SPRITES
IMG = menu obstacle formel1\
IMG = $(notdir $(wildcard $(IMGDIR)/*.bmp))
# END OF FILE

View File

Before

Width:  |  Height:  |  Size: 654 B

After

Width:  |  Height:  |  Size: 654 B

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB