Makefile für wxWidgets Projekte unter Mac OSX

PROG = main
arch_flags=-arch i386
#CFLAGS=$(arch_flags) -O2 -pipe -fno-rtti -fno-exceptions -fomit-frame-pointer -Wall
CFLAGS = $(arch_flags) -Wall -MD -g
LDFLAGS=$(arch_flags)
OBJFILES = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
WXPATH=/Users/andrer/projekte/wxWidgets/current/cocoa-build-debug
CXX = $(shell $(WXPATH)/wx-config --cxx)
WXLIBS = $(shell $(WXPATH)/wx-config --libs)
WXFLAGS= $(shell $(WXPATH)/wx-config --cppflags)
 
TAGS = ctags
TAGSFLAGS = -a
TAGSFILE = tags
 
.PHONY: clean cleantags cleanall
 
all: $(PROG)
 
$(PROG): $(OBJFILES)
	$(CXX) $(LDFLAGS) $(OBJFILES) -o $(PROG) $(WXLIBS)
 
%.o: %.cpp
	$(CXX) $(CFLAGS) $(WXFLAGS) -c -o $@ $<
 
clean:
	rm -f $(OBJFILES) $(PROG)
 
tags:
	$(TAGS) $(TAGSFLAGS) -f $(TAGSFILE) $(wildcard *.cpp)
 
cleantags:
	rm -f $(TAGSFILE)
 
cleanall: clean cleantags
programming/wxwidgets/makefileosx.txt · Zuletzt geändert: 2011/07/22 23:26 (Externe Bearbeitung)
 
Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki