nuclear@0: PREFIX = /usr/local nuclear@0: nuclear@0: ccsrc = $(wildcard src/*.cc) nuclear@0: csrc = $(wildcard src/*.c) $(wildcard src/optcfg/*.c) nuclear@0: obj = $(csrc:.c=.o) $(ccsrc:.cc=.o) nuclear@0: dep = $(obj:.o=.d) nuclear@0: bin = xglcomp nuclear@0: nuclear@0: warn = -pedantic -Wall nuclear@0: dbg = -g nuclear@0: opt = -O0 nuclear@0: incpaths = -Isrc/optcfg nuclear@0: nuclear@0: CFLAGS = $(warn) $(dbg) $(opt) $(incpaths) nuclear@0: CXXFLAGS = $(warn) $(dbg) $(opt) $(incpaths) nuclear@0: LDFLAGS = -lGL -lGLEW -lX11 -lXext -lXcomposite -lm nuclear@0: nuclear@0: $(bin): $(obj) nuclear@0: $(CXX) -o $@ $(obj) $(LDFLAGS) nuclear@0: nuclear@0: -include $(dep) nuclear@0: nuclear@0: %.d: %.c nuclear@0: @$(CPP) $(CFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@0: nuclear@0: %.d: %.cc nuclear@0: @$(CPP) $(CXXFLAGS) $< -MM -MT $(@:.d=.o) >$@ nuclear@0: nuclear@0: .PHONY: clean nuclear@0: clean: nuclear@0: rm -f $(obj) $(bin) nuclear@0: nuclear@0: .PHONY: cleandep nuclear@0: cleandep: nuclear@0: rm -f $(dep) nuclear@0: nuclear@0: .PHONY: install nuclear@0: install: $(bin) nuclear@0: mkdir -p $(DESTDIR)$(PREFIX)/bin nuclear@0: cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) nuclear@0: nuclear@0: .PHONY: uninstall nuclear@0: uninstall: nuclear@0: rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)