Intégrer fichier ressource à un Makefile

Résolu/Fermé
greg7896 Messages postés 1 Date d'inscription jeudi 3 juillet 2014 Statut Membre Dernière intervention 3 juillet 2014 - Modifié par fiddy le 8/07/2014 à 00:22
Bonjour,
Voila j'ai le makefile suivant et je ne sais pas comment bien intégrer mon fichier ressource (resfile.rc). avec le makefile suivant il me dit "fichier refile.o introuvable..."
Est ce que quelqu'un aurait une idée ?

# Compilateur
CC=gcc


# Options du compilateur
CFLAGS=-O2 -Wall 'sdl-config --cflags'

# Option du linker
#LIBS='sdl-config --libs' -lm -lSDL_ttf
LIBS='sdl-config --static-libs' -lm


resfile.o: resfile.rc
windres -i resfile.rc -o resfile.o


DLL_DIR=$(USB_DRIVE)/Systeme/DLLs
# Cible generique
%: graphics.o %.c
$(CC) $(CFLAGS) resfile.o graphics.o $@.c -o $@ $(LIBS)




graphics.o: graphics.c graphics.h
rm -f police.h
touch police.h
sdl-config --cflags
# if test -e /usr/include/SDL_ttf.h; then echo "#define SDL_TTF_OK" > police.h; fi
# if test -e /usr/include/SDL/SDL_ttf.h; then echo "#define SDL_TTF_OK" > police.h; fi
# if test -e /usr/local/include/SDL_ttf.h; then echo "#define SDL_TTF_OK" > police.h; fi
# if test -e /usr/local/include/SDL/SDL_ttf.h; then echo "#define SDL_TTF_OK" > police.h; fi
$(CC) $(CFLAGS) -c graphics.c

#sans_ttf:
# rm -f police.h
# touch police.h
# $(CC) $(CFLAGS) -c graphics.c
# $(CC) $(CFLAGS) graphics.o exemple.c -o exemple $(LIBS)
# ./exemple



clean:
rm -f *core
rm -f *.o
rm -f police.h
rm -f *.exe

Merci :)