File: common.am

package info (click to toggle)
muse 0.8.1a-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 14,128 kB
  • ctags: 8,595
  • sloc: cpp: 68,637; sh: 8,640; ansic: 1,457; makefile: 854; python: 579
file content (42 lines) | stat: -rw-r--r-- 1,081 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
AM_CXXFLAGS = $(MUSECXXFLAGS) -I.. -I$(top_srcdir)/synti -I$(top_srcdir)/muse/widgets
AM_CXXFLAGS += -DQT_SHARED -DQT_THREAD_SUPPORT -DQT_PLUGIN
AM_CPPFLAGS =

UIFILES = $(wildcard *.ui)

MOCFILES = $(shell for h in $(filter %.h,$(SOURCES)); do \
		     if grep -q Q_OBJECT $$h; then \
		       echo $$h | sed "s/\(.*\)\.h/moc_\1.cpp/"; \
		     fi; \
		   done)

BUILT_SOURCES = $(MOCFILES) $(UIFILES:%.ui=%.h)

MOSTLYCLEANFILES = $(MOCFILES) $(UIFILES:%.ui=%.h)

de:
	@for base in $(MOCFILES); do echo -e "\t$${base}.cpp $${base}.h \\"; done

nde:
	@for base in $(MOCFILES); do echo -e "\tmoc_$${base}.cpp \\"; done

SUFFIXES = .ui .h.gch

.ui.o: %.h
	$(UIC) -L $(top_srcdir)/muse/widgets -o $*.cpp -impl $*.h $*.ui
	$(MOC) $*.h >> $*.cpp
	$(CXXCOMPILE) -c $*.cpp -o $*.o
	$(RM) $*.cpp moc_$*.cpp moc_$*.o

.ui.lo: %.h
	$(UIC) -L $(top_srcdir)/muse/widgets -o $*.cpp -impl $*.h $*.ui
	$(MOC) $*.h >> $*.cpp
	$(LTCXXCOMPILE) -c $*.cpp -o $*.lo
	$(RM) $*.cpp moc_$*.cpp moc_$*.lo moc_$*.o


moc_%.cpp: %.h
	$(MOC) $< -o $@

%.h: %.ui
	$(UIC) -L $(top_srcdir)/muse/widgets -o $@ $<