diff --git a/Makefile b/Makefile index c7fa306..1d24c0f 100755 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/Makefile.config b/Makefile.config index 417eac4..7c3b7c7 100755 --- a/Makefile.config +++ b/Makefile.config @@ -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 \ No newline at end of file +#IMAGE + IMG = $(wildcard **/*.bmp) + +# END OF FILE diff --git a/README.md b/README.md index a576695..71ff992 100755 --- a/README.md +++ b/README.md @@ -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. \ No newline at end of file +- `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 diff --git a/misc/icon.bmp b/misc/icon.bmp new file mode 100644 index 0000000..87be441 Binary files /dev/null and b/misc/icon.bmp differ