You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
633 B

9 months ago
9 months ago
  1. #
  2. # Makefile that builds btest and other helper programs for the CS:APP data lab
  3. #
  4. CC = gcc
  5. CFLAGS = -O -Wall -m32
  6. LIBS = -lm
  7. all: btest fshow ishow
  8. btest: btest.c bits.c decl.c tests.c btest.h bits.h
  9. $(CC) $(CFLAGS) $(LIBS) -o btest bits.c btest.c decl.c tests.c
  10. fshow: fshow.c
  11. $(CC) $(CFLAGS) -o fshow fshow.c
  12. ishow: ishow.c
  13. $(CC) $(CFLAGS) -o ishow ishow.c
  14. # Forces a recompile. Used by the driver program.
  15. btestexplicit:
  16. $(CC) $(CFLAGS) $(LIBS) -o btest bits.c btest.c decl.c tests.c
  17. clean:
  18. rm -f *.o btest fshow ishow *~
  19. oneshoot:
  20. make clean; \
  21. ./dlc bits.c; \
  22. make btest; \
  23. ./btest bits.c; \
  24. make clean \