summaryrefslogtreecommitdiffstats
path: root/ksysguard/Makefile.in.temp
blob: fbf54fb7b12c1c4891a3cb085599bf92fb53c0fd (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

# the most documentation you find in Makefile.am
# this file is just to demonstrate, how complex it is to
# write good Makefiles, if you don't use automake ;)

# export the variables, we're using
prefix		= @prefix@
exec_prefix	= @exec_prefix@
top_srcdir 	= @top_srcdir@
kde_appsdir 	= @kde_appsdir@
kde_cgidir 	= @kde_cgidir@
kde_confdir 	= @kde_confdir@
kde_datadir 	= @kde_datadir@
kde_htmldir 	= @kde_htmldir@
kde_icondir 	= @kde_icondir@
kde_locale 	= @kde_locale@
kde_mimedir 	= @kde_mimedir@
kde_minidir 	= @kde_minidir@
kde_toolbardir 	= @kde_toolbardir@
kde_wallpaperdir= @kde_wallpaperdir@
bindir		= @bindir@

all_includes	= @all_includes@
all_libraries	= @all_libraries@

TQMOC		= @TQMOC@
XGETTEXT	= @XGETTEXT@
CXX		= @CXX@
LDFLAGS		= @LDFLAGS@
CXXFLAGS	= @CXXFLAGS@
LIBSOCKET	= @LIBSOCKET@
INSTALL		= @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA 	= @INSTALL_DATA@
INSTALL_SCRIPT 	= @INSTALL_SCRIPT@   

# define some variables
mkinstalldirs	= $(SHELL) $(top_srcdir)/mkinstalldirs 
APPSDIR 	= $(kde_appsdir)/Utilities
INCLUDES	= $(all_includes)
TARGET		= khexdit
LIBS		= -lkfm -lkdeui -lkdecore -lqt -lX11 -lXext $(LIBSOCKET)
LDFLAGS		+= $(all_libraries)

# rules to make .o files
.SUFFIXES: .cpp
.cpp.o:
	$(CXX) $(CXXFLAGS) $(DEFS) $(INCLUDES) -c $< 

OBJECTS = hexfile.o hexwidget.o
SRCTQMOCS = hexwidget.moc hexfile.moc

all: $(TARGET)

$(TARGET): $(SRCTQMOCS) $(OBJECTS) 
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)

# recreate the Makefile
Makefile: Makefile.in
	cd .. && CONFIG_FILES=khexdit/$@ CONFIG_HEADERS= $(SHELL) ./config.status

install: install-data install-exec

# make messages.po. Move this one to ../po/ and "make merge" in po
messages:
	$(XGETTEXT) -C -ktranslate *.cpp

install-exec: $(TARGET)
	$(mkinstalldirs) $(bindir)
	$(INSTALL_PROGRAM) $(TARGET) $(bindir)

install-data: 
	(cd doc && $(MAKE) install-data)
	$(mkinstalldirs) $(APPSDIR)
	$(INSTALL_DATA) khexdit.kdelnk $(APPSDIR)
	$(mkinstalldirs) $(kde_icondir)
	$(INSTALL_DATA) khexdit.xpm $(kde_icondir)
	$(mkinstalldirs) $(kde_minidir)
	$(INSTALL_DATA) mini-khexdit.xpm $(kde_minidir)/khexdit.xpm

uninstall:
	(cd doc && $(MAKE) uninstall)
	-rm -f $(bindir)/$(TARGET)
	-rm -f $(APPSDIR)/khexdit.kdelnk
	-rm -f $(kde_icondir)/khexdit.xpm
	-rm -f $(kde_minidir)/khexdit.xpm

clean:
	-rm -f $(TARGET) $(OBJECTS) *~ core

distclean: clean
	-rm -f Makefile $(SRCTQMOCS)

# add a dependcy for all tqmoc files to help some FreeBSD users ;)
hexwidget.moc: hexwidget.h
	$(TQMOC) hexwidget.h -o hexwidget.moc

hexfile.moc: hexfile.h
	$(TQMOC) hexfile.h -o hexfile.moc