Makefile.in 1.98 KB
Newer Older
Roland McGrath's avatar
Roland McGrath committed
1 2 3
# This was taken from the output of Imake
# and set up to be configured by ../configure.
# Some parts Copyright (c) 1992, 1993 Lucid, Inc.
Richard M. Stallman's avatar
Richard M. Stallman committed
4

5 6 7
srcdir=@srcdir@
VPATH=@srcdir@
C_SWITCH_X_SITE=@C_SWITCH_X_SITE@
Richard M. Stallman's avatar
Richard M. Stallman committed
8

9 10 11 12
CC=@CC@
CFLAGS=@CFLAGS@
CPP=@CPP@
LN_S=@LN_S@
13
# See below--@X_TOOLKIT_TYPE@ is used below.
14
USE_X_TOOLKIT=@X_TOOLKIT_TYPE@
Richard M. Stallman's avatar
Richard M. Stallman committed
15 16 17 18 19 20 21 22 23

              TOP = .

               AR = ar cq

               LN = ln -s
           RANLIB = ranlib
               RM = rm -f

Fred Pierresteguy's avatar
Fred Pierresteguy committed
24
     LUCID_OBJS = lwlib-Xlw.o xlwmenu.o lwlib-Xaw.o
Richard M. Stallman's avatar
Richard M. Stallman committed
25
     MOTIF_OBJS = lwlib-Xm.o
26
      OLIT_OBJS = lwlib-Xol.o lwlib-Xolmb.o
Richard M. Stallman's avatar
Richard M. Stallman committed
27

28 29
TOOLKIT_DEFINES = -DUSE_$(USE_X_TOOLKIT)
   TOOLKIT_OBJS = $(@X_TOOLKIT_TYPE@_OBJS)
30 31

           OBJS = lwlib.o $(TOOLKIT_OBJS) lwlib-utils.o
Richard M. Stallman's avatar
Richard M. Stallman committed
32

33
# ../src is needed to find config.h.
34 35
ALL_CFLAGS= $(C_SWITCH_SITE) $(C_SWITCH_SYSTEM) $(C_SWITCH_X_SITE) \
  $(C_SWITCH_X_SYSTEM) $(C_SWITCH_MACHINE) $(CPPFLAGS) $(CFLAGS) \
36
  -DEMACS_BITMAP_FILES -DHAVE_CONFIG_H -Demacs \
37
  -I. -I../src -I${srcdir} -I${srcdir}/../src
Richard M. Stallman's avatar
Richard M. Stallman committed
38 39

.c.o:
40
	$(CC) -c ${ALL_CFLAGS} $<
Richard M. Stallman's avatar
Richard M. Stallman committed
41 42 43 44 45 46

all:: liblw.a

liblw.a: $(OBJS)
	$(RM) $@
	$(AR) $@ $(OBJS)
47 48 49 50 51
	@echo Do not be alarmed if the following ranlib command
	@echo fails due to the absence of a ranlib program on your system.
	-$(RANLIB) $@ || true
#If running ranlib fails, probably there is none.
#That's ok.  So don't stop the build.
Richard M. Stallman's avatar
Richard M. Stallman committed
52

53 54
# Depend on Makefile so that we recompile if TOOLKIT_DEFINES changes.
lwlib.o:  $(srcdir)/lwlib.c  Makefile
55
	$(CC) -c $(TOOLKIT_DEFINES) $(ALL_CFLAGS) $(srcdir)/lwlib.c
Richard M. Stallman's avatar
Richard M. Stallman committed
56

Richard M. Stallman's avatar
Richard M. Stallman committed
57
xrdb-cpp.o:  $(srcdir)/xrdb-cpp.c
58
	$(CC) -c "-DCPP_PROGRAM=$(CPP)" $(ALL_CFLAGS) $(srcdir)/xrdb-cpp.c
Richard M. Stallman's avatar
Richard M. Stallman committed
59 60

lwlib-utils.o: lwlib-utils.h
61 62
lwlib.o:       lwlib.h lwlib-int.h
lwlib-Xlw.o:   lwlib.h lwlib-int.h
Fred Pierresteguy's avatar
Fred Pierresteguy committed
63
lwlib-Xaw.o:   lwlib.h lwlib-int.h
64 65 66
lwlib-Xm.o:    lwlib.h lwlib-int.h lwlib-utils.h
lwlib-Xol.o:   lwlib.h lwlib-int.h
lwlib-Xolmb.o: lwlib-Xolmb.h lwlib-XolmbP.h
Richard M. Stallman's avatar
Richard M. Stallman committed
67

68 69
mostlyclean:
	$(RM) *.o core errs ,* *~ *.a .emacs_* make.log MakeOut \#*
Richard M. Stallman's avatar
Richard M. Stallman committed
70

71 72
clean: mostlyclean
distclean: clean
73
maintainer-clean: distclean
Richard M. Stallman's avatar
Richard M. Stallman committed
74 75

tags::
76
	$(TAGS) -t *.[ch]