File: Makefile

package info (click to toggle)
gxedit 1.15-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,008 kB
  • ctags: 882
  • sloc: ansic: 12,736; makefile: 149; sh: 26
file content (73 lines) | stat: -rw-r--r-- 2,513 bytes parent folder | download
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
BIN_DIR =
INSTALL_DIR = $(DESTDIR)/usr/X11R6/bin/
CFLAGS = `gtk-config --cflags` -I/usr/local/include -I. -O -Wall
GTKEDITOR_CFLAGS = -I../gtkeditor-0.0.2-1
GNOME_CFLAGS = -DUSE_GNOME
LIBS = `gtk-config --libs`
GNOME_LIBS = -lgnomesupport -lgnome -lgnomeui
OBJS = bindings.o gxedit.o net.o
GTKEDITOR_OBJS = ../gtkeditor-0.0.2-1/gtkeditor.o ../gtkeditor-0.0.2-1/regex.o
CC = gcc

all:
	@echo "Use ./setup"

gxedit:
	$(CC) -o .chk_config chk_config.c
	@(./.chk_config)

gxe:
	$(CC) $(CFLAGS) -c gxedit.c
	$(CC) $(CFLAGS) -c net.c
	$(CC) $(CFLAGS) -c bindings.c
	$(CC) $(CFLAGS) -o $(BIN_DIR)gxedit $(OBJS) $(LIBS)
	@(rm -f ./.chk_config)
	(cd xproc-src; make BIN_DIR=../; cd ..)
	@echo "You should delete your ~/.gxedit file to allow GXedit to re-create it if you're upgrading GXedit."

gxe-with-gtkeditor:
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -c gxedit.c
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -c net.c
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -c bindings.c
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -o $(BIN_DIR)gxedit $(OBJS) $(GTKEDITOR_OBJS) $(LIBS)
	@(rm -f ./.chk_config)
	(cd xproc-src; make BIN_DIR=../; cd ..)
	@echo "You should delete your ~/.gxedit file to allow GXedit to re-create it if you're upgrading GXedit."

gxe-with-gnome:
	$(CC) -o .chk_config chk_config.c
	(./.chk_config)
	$(CC) $(CFLAGS) $(GNOME_CFLAGS) -c gxedit.c
	$(CC) $(CFLAGS) $(GNOME_CFLAGS) -c net.c
	$(CC) $(CFLAGS) $(GNOME_CFLAGS) -c bindings.c
	$(CC) $(CFLAGS) $(GNOME_CFLAGS) -o $(BIN_DIR)gxedit $(OBJS) $(LIBS) $(GNOME_LIBS)
	(cd xproc-src; make BIN_DIR=../; cd ..)
	@echo "You should delete your ~/.gxedit file to allow GXedit to re-create it if you're upgrading GXedit."

say:
	(cd access; make BIN_DIR=../)

say-install:
	cp say $(INSTALL_DIR)say

clean:
	rm -f *.o $(BIN_DIR)gxedit $(BIN_DIR)say $(BIN_DIR)xproc *.log

install:
	cp $(BIN_DIR)gxedit $(INSTALL_DIR)gxedit
	cp $(BIN_DIR)xproc $(INSTALL_DIR)xproc

distro:
	rm -f *.o $(BIN_DIR)gxedit $(BIN_DIR)say $(BIN_DIR)xproc *.log *.enc
	cp config.dist config.h
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -c gxedit.c
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -c net.c
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -c bindings.c
	$(CC) $(CFLAGS) $(GTKEDITOR_CFLAGS) -o gxedit $(OBJS) -L/usr/local/lib -L/usr/X11R6/lib $(GTKEDITOR_OBJS) /usr/local/lib/libgtk-1.1.a /usr/local/lib/libgdk-1.1.a /usr/local/lib/libglib-1.1.a -lXext -lX11 -lm
	(cd xproc-src; make distro BIN_DIR=../; cd ..)
	(cd access; make BIN_DIR=../)
	mv say dist/
	mv gxedit dist/
	mv xproc dist/
	rm -f *.o
	cp config.default config.h