quelques modifs

This commit is contained in:
flo 2017-02-24 21:08:57 +01:00
parent cc930929cd
commit a9f14bc15f
4 changed files with 33 additions and 20 deletions

View File

@ -3,8 +3,8 @@
include $(CURDIR)/Makefile.config
# DEDUCED VARS
ALLOBJ = $(SRC:%=$(OBJDIR)/%.o)
ALLINC = $(INC:%=$(INCDIR)/%.h)
ALLOBJ = $(patsubst %,$(OBJDIR)/%.o,$(SRC))
ALLINC = $(INC:%=$(INCDIR)/%)
# RULES
## Make it all (default rule)
@ -15,12 +15,12 @@ $(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)
$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.c.o: $(SRCDIR)/%.c $(ALLINC)
$(CC) -c -o $@ $< $(CFLAGS)
## Make the ELF file
$(NAME).elf: $(OBJDIR) $(ALLOBJ)
@ -28,33 +28,35 @@ $(NAME).elf: $(OBJDIR) $(ALLOBJ)
## Make the BIN file
$(NAME).bin: $(NAME).elf
$(OBJCPY) -R .comment -R .bss -R '$$iop' -O binary $< $@
$(OBJCPY) -R .comment -R .bss -R '$$iop' -O binary $< $@
## Make the G1A file
$(NAME).g1a: $(NAME).bin
$(WRAPR) $< -o $(NAME).g1a
$(WRAPR) $< -o $(NAME).g1a -i $(IMG)
@stat -c "Build finished -- output size is %s bytes." $(NAME).g1a
## Clean up your mess
clean:
$(RM) $(ALLOBJ)
$(RM) $(OBJDIR)
$(RM) $(NAME).elf
$(RM) $(NAME).bin
## Clean up everything
mrproper: clean
fclean: clean
$(RM) $(NAME).g1a
fclean: mrproper
$(RM) $(NAME).txt
dump:
$(OBJDUMP) -d $(NAME).elf > $(NAME).txt
@stat -c "Dump file -- dump file in %n ." $(NAME).txt
## Remake
re: fclean all
## Send to calc
send:
@if [ ! -f $(NAME).g1a ]; then \
echo "Please make before sending."; \
else $(SENDR) send $(NAME).g1a \
fi
$(SENDR) send $(NAME).g1a -f
## Phuneral phuture ?
.PHONY: all clean fclean mrproper re send
.PHONY: all clean fclean dump re send
# END OF FILE

View File

@ -15,7 +15,7 @@ SCPTDIR = ./scripts
## Directory maker
MD = mkdir -p
## File remover
RM = rm -f
RM = rm -f -r
## Assembler
AS = sh3eb-elf-as
## C compiler
@ -26,15 +26,20 @@ LD = sh3eb-elf-gcc
LFLAGS = `fxsdk --cflags` `fxsdk --libs`
## Object copier
OBJCPY = sh3eb-elf-objcopy
## Object dump
OBJDUMP = sh3eb-elf-objdump
## G1A Wrapper
WRAPR = g1a-wrapper
## Sender
SENDR = p7
# SOURCES
SRC = Sound4Calc\
SRC = $(notdir $(wildcard $(SRCDIR)/*.[cs]))
# INCLUDES
INC = Sound4Calc addresses\
INC = $(notdir $(wildcard $(INCDIR)/*.h))
# END OF FILE
#IMAGE
IMG = $(wildcard **/*.bmp)
# END OF FILE

View File

@ -6,4 +6,10 @@ Building the library is achieved by the Makefile :
- `make`: make the library ;
- `make clean`: clean the object files ;
- `make fclean`: clean the object files and the final library ;
- `make re`: cleans the object files and the final library, then makes the project.
- `make re`: cleans the object files and the final library, then makes the project.
These sources can be compiled with __GCC__ and use __Gint__ (Lephe's library)
## Final project
A sound library to make sound in games. Need GCC and Gint

BIN
misc/icon.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB