Makefile 436 B

12345678910111213141516171819202122
  1. CC=gcc
  2. CXX=g++
  3. CFLAGS=-g3 -I. -Wall -Wextra
  4. all : plainc objectivecpp customoo
  5. .PHONY : all
  6. %.o: %.c $(DEPS)
  7. $(CC) -c -o $@ $< $(CFLAGS)
  8. %.o: %.cpp $(DEPS)
  9. $(CXX) -std=c++11 -c -o $@ $< $(CFLAGS)
  10. plainc: plainc.o
  11. $(CC) -o plainc plainc.o $(CFLAGS) -lreadline
  12. objectivecpp: objectivecpp.o
  13. $(CXX) -o objectivecpp objectivecpp.o $(CFLAGS) -lreadline
  14. customoo: customoo.o
  15. $(CXX) -o customoo customoo.o $(CFLAGS) -lreadline