From a9f14bc15f44444663a3021dcd7d9b8e3d4c0741 Mon Sep 17 00:00:00 2001 From: flo Date: Fri, 24 Feb 2017 21:08:57 +0100 Subject: [PATCH] quelques modifs --- Makefile | 32 +++++++++++++++++--------------- Makefile.config | 13 +++++++++---- README.md | 8 +++++++- misc/icon.bmp | Bin 0 -> 1802 bytes 4 files changed, 33 insertions(+), 20 deletions(-) create mode 100644 misc/icon.bmp 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 0000000000000000000000000000000000000000..87be4410b5b0c59d9123a7597511682a96e84e43 GIT binary patch literal 1802 zcmcgq!41MN40Jvq@#VvdHxn=bFOXmm#2|fi45nZY#0)IJyI8eqE_PC)iV!KO<2#?P zR(7YwocgupbHjVhd&xV{icg~Ztp7wuS8dV0nsj$;>uHB)J?&xiB^`uY&OC%coyLol z#z8Sth~u6R#n?AN^b!>3w8kbdkhvlmA<*MAB3j||J|kq4Z$7>m&uMEP4N92c`{&x% zfBH5*YetAO`N}*;zWrE?fNGa8<9SPk>g7yJ2ShQ}{;$NF7GjdFbts=>I^S4il#