Makefile 576 B

123456789101112131415161718192021222324252627282930
  1. CFLAGS:= -Wall -std=c99 -pedantic
  2. CXX:= gcc
  3. PROG:= spngfx
  4. LDFLAGS:=
  5. LDFLAGS+= -l spngstream
  6. OBJS:= methods.o main.o
  7. all: $(PROG)
  8. %.o: %.c
  9. $(CXX) $(CFLAGS) -c $<
  10. $(PROG): $(OBJS)
  11. $(CXX) $(CFLAGS) -g $(OBJS) -o $(PROG) $(LDFLAGS)
  12. rm *.o
  13. install: all
  14. @echo installing executable file to ${DESTDIR}${PREFIX}/bin
  15. @mkdir -p ${DESTDIR}${PREFIX}/bin
  16. @cp -f ${PROG} ${DESTDIR}${PREFIX}/bin
  17. @chmod 755 ${DESTDIR}${PREFIX}/bin/${PROG}
  18. uninstall:
  19. @echo removing executable file from ${DESTDIR}${PREFIX}/bin
  20. @rm -f ${DESTDIR}${PREFIX}/bin/${PROG}
  21. clean:
  22. rm -f $(PROG) *.o