.PHONY: clean, mrproper CC = gcc CXX = g++ LD = gcc LDFLAGS = -lstdc++ CFLAGS = CXXFLAGS = OutFile = makeinitrd Objects = main.o all: $(OutFile) rebuild: mrproper all $(OutFile): $(Objects) $(LD) -o $(OutFile) $(LDFLAGS) $^ %.o: %.c $(CC) -c $< -o $@ $(CFLAGS) %.o: %.cpp $(CXX) -c $< -o $@ $(CXXFLAGS) clean: rm -rf *.o mrproper: clean rm -rf $(OutFile)