Fixed Makefile (detects files with wildcards) and renamed images.
This commit is contained in:
parent
c1fc4a589e
commit
5e4e4adf66
10
Makefile
10
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Before Width: | Height: | Size: 654 B After Width: | Height: | Size: 654 B |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Loading…
Reference in New Issue