Paste: Makefile
Author: | optimizer |
Mode: | factor |
Date: | Tue, 27 Oct 2009 23:42:41 |
Plain Text |
CXXFLAGS=-I/usr/local/include/ -g -Wall
LDFLAGS=-L/usr/local/lib -lglfw -lGLU -lGL
SRCS := $(shell find -name "*.cpp")
OBJS := $(patsubst %.cpp, %.o, $(filter %.cpp, $(SRCS)))
prog: $(OBJS)
$(CXX) $(CXXFLAGS) $^ -o $@
include Makefile.depend
depend: Makefile.depend
Makefile.depend: $(SRCS)
g++ -MM $(SRCS) > Makefile.depend
clean:
rm -f *.o prog
.PHONY: clean
~
Author: | alo |
Mode: | makefile |
Date: | Fri, 4 Dec 2009 23:12:01 |
Plain Text |
CC = gcc
CFLAGS = -ansi -pedantic -Wall
LDFLAGS =
EXEC = mastermind
SRC = $(wildcard *.c)
OBJ = $(SRC:.c=.o)
TGZDIR = MasterMind
all: $(EXEC) clean
clean:
@rm -rf *.out
@rm -rf *.o
@rm -rf *~
@rm -rf cscope.out
cleaner: clean
@rm -rf $(EXEC)
dist: cleaner
@mkdir $(TGZDIR)
@cp *.c $(TGZDIR)
@cp *.h $(TGZDIR)
@cp Makefile $(TGZDIR)
@cp Projet.pdf $(TGZDIR)
tar -cvzf $(TGZDIR).tar.gz $(TGZDIR)
@rm -rvf $(TGZDIR)
.PHONY: clean cleaner dist
mastermind: $(OBJ)
@$(CC) -o $(@) $^ $(LDFLAGS)
main.o: Mastermind.h Reponse.h Sequence.h Tab4.h Tab6.h
Mastermind.o: Mastermind.h Reponse.h Sequence.h Tab4.h Tab6.h
Reponse.o: Reponse.h
Sequence.o: Sequence.h
Tab4.o: Tab4.h
Tab6.o: Tab6.h
%.o: %.c base.h
@$(CC) -o $@ -c $< $(CFLAGS)
New Annotation