123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- --- Makefile 1996-07-02 16:36:06.000000000 +0200
- +++ Makefile.oden 2004-09-11 17:39:00.308986936 +0200
- @@ -30,6 +30,10 @@
- ######### define this, and read about the GSM_OPT_WAV49 option in the
- ######### manual page on gsm_option(3).
-
- +PG =
- +#PG = -g -pg
- +######### Profiling flags. If you don't know what that means, leave it blank
- +
- # Choose a compiler. The code works both with ANSI and K&R-C.
- # Use -DNeedFunctionPrototypes to compile with, -UNeedFunctionPrototypes to
- # compile without, function prototypes in the header files.
- @@ -44,7 +48,7 @@
- # CCFLAGS = -c -O
-
- CC = gcc -ansi -pedantic
- -CCFLAGS = -c -O2 -DNeedFunctionPrototypes=1
- +CCFLAGS = -c $(RPM_OPT_FLAGS) -fPIC -D_REENTRANT -DNeedFunctionPrototypes=1
-
- LD = $(CC)
-
- @@ -64,43 +68,27 @@
- # LDLIB = -lgcc
- ######### Additional libraries needed by $(LD)
-
- -
- -# Where do you want to install libraries, binaries, a header file
- -# and the manual pages?
- -#
- -# Leave INSTALL_ROOT empty (or just don't execute "make install") to
- -# not install gsm and toast outside of this directory.
- -
- -INSTALL_ROOT =
- -
- # Where do you want to install the gsm library, header file, and manpages?
- #
- -# Leave GSM_INSTALL_ROOT empty to not install the GSM library outside of
- +# Leave DESTDIR empty to not install the GSM library outside of
- # this directory.
-
- -GSM_INSTALL_ROOT = $(INSTALL_ROOT)
- -GSM_INSTALL_LIB = $(GSM_INSTALL_ROOT)/lib
- -GSM_INSTALL_INC = $(GSM_INSTALL_ROOT)/inc
- -GSM_INSTALL_MAN = $(GSM_INSTALL_ROOT)/man/man3
- +DESTDIR =
-
- -
- -# Where do you want to install the toast binaries and their manpage?
- -#
- -# Leave TOAST_INSTALL_ROOT empty to not install the toast binaries outside
- -# of this directory.
- -
- -TOAST_INSTALL_ROOT = $(INSTALL_ROOT)
- -TOAST_INSTALL_BIN = $(TOAST_INSTALL_ROOT)/bin
- -TOAST_INSTALL_MAN = $(TOAST_INSTALL_ROOT)/man/man1
- +prefix = /usr
- +libdir = $(prefix)/lib
- +includedir = $(prefix)/include
- +datadir = $(prefix)/share
- +mandir = $(datadir)/man
-
- # Other tools
-
- SHELL = /bin/sh
- -LN = ln
- +LN = ln -s
- BASENAME = basename
- AR = ar
- ARFLAGS = cr
- -RMFLAGS =
- +RMFLAGS = -f
- FIND = find
- COMPRESS = compress
- COMPRESSFLAGS =
- @@ -129,17 +117,18 @@
- # DEBUG = -DNDEBUG
- ######### Remove -DNDEBUG to enable assertions.
-
- -CFLAGS = $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
- +CFLAGS = $(PG) $(CCFLAGS) $(SASR) $(DEBUG) $(MULHACK) $(FAST) $(LTP_CUT) \
- $(WAV49) $(CCINC) -I$(INC)
- ######### It's $(CC) $(CFLAGS)
-
- -LFLAGS = $(LDFLAGS) $(LDINC)
- +LFLAGS = $(PG) $(LDFLAGS) $(LDINC)
- ######### It's $(LD) $(LFLAGS)
-
-
- # Targets
-
- LIBGSM = $(LIB)/libgsm.a
- +LIBGSMSO = $(LIB)/libgsm.so
-
- TOAST = $(BIN)/toast
- UNTOAST = $(BIN)/untoast
- @@ -257,18 +246,19 @@
- # Install targets
-
- GSM_INSTALL_TARGETS = \
- - $(GSM_INSTALL_LIB)/libgsm.a \
- - $(GSM_INSTALL_INC)/gsm.h \
- - $(GSM_INSTALL_MAN)/gsm.3 \
- - $(GSM_INSTALL_MAN)/gsm_explode.3 \
- - $(GSM_INSTALL_MAN)/gsm_option.3 \
- - $(GSM_INSTALL_MAN)/gsm_print.3
- + $(DESTDIR)$(libdir)/libgsm.a \
- + $(DESTDIR)$(libdir)/libgsm.so \
- + $(DESTDIR)$(includedir)/gsm/gsm.h \
- + $(DESTDIR)$(mandir)/man3/gsm.3 \
- + $(DESTDIR)$(mandir)/man3/gsm_explode.3 \
- + $(DESTDIR)$(mandir)/man3/gsm_option.3 \
- + $(DESTDIR)$(mandir)/man3/gsm_print.3
-
- TOAST_INSTALL_TARGETS = \
- - $(TOAST_INSTALL_BIN)/toast \
- - $(TOAST_INSTALL_BIN)/tcat \
- - $(TOAST_INSTALL_BIN)/untoast \
- - $(TOAST_INSTALL_MAN)/toast.1
- + $(DESTDIR)$(bindir)/toast \
- + $(DESTDIR)$(bindir)/tcat \
- + $(DESTDIR)$(bindir)/untoast \
- + $(DESTDIR)$(mandir)/man1/toast.1
-
-
- # Default rules
- @@ -279,7 +269,7 @@
-
- # Target rules
-
- -all: $(LIBGSM) $(TOAST) $(TCAT) $(UNTOAST)
- +all: $(LIBGSM) $(LIBGSMSO) $(TOAST) $(TCAT) $(UNTOAST)
- @-echo $(ROOT): Done.
-
- tst: $(TST)/lin2cod $(TST)/cod2lin $(TOAST) $(TST)/test-result
- @@ -299,24 +289,28 @@
-
- # The basic API: libgsm
-
- +$(LIBGSMSO): $(LIB) $(GSM_OBJECTS)
- + $(LD) -o $@.1.0.10 -shared -Xlinker -soname -Xlinker libgsm.so.1 $(GSM_OBJECTS) -lc
- + ln -fs libgsm.so.1.0.10 lib/libgsm.so.1
- + ln -fs libgsm.so.1.0.10 lib/libgsm.so
- +
- $(LIBGSM): $(LIB) $(GSM_OBJECTS)
- -rm $(RMFLAGS) $(LIBGSM)
- $(AR) $(ARFLAGS) $(LIBGSM) $(GSM_OBJECTS)
- $(RANLIB) $(LIBGSM)
-
- -
- # Toast, Untoast and Tcat -- the compress-like frontends to gsm.
-
- -$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSM)
- - $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSM) $(LDLIB)
- +$(TOAST): $(BIN) $(TOAST_OBJECTS) $(LIBGSMSO)
- + $(LD) $(LFLAGS) -o $(TOAST) $(TOAST_OBJECTS) $(LIBGSMSO) $(LDLIB)
-
- $(UNTOAST): $(BIN) $(TOAST)
- -rm $(RMFLAGS) $(UNTOAST)
- - $(LN) $(TOAST) $(UNTOAST)
- + $(LN) toast $(UNTOAST)
-
- $(TCAT): $(BIN) $(TOAST)
- -rm $(RMFLAGS) $(TCAT)
- - $(LN) $(TOAST) $(TCAT)
- + $(LN) toast $(TCAT)
-
-
- # The local bin and lib directories
- @@ -331,72 +325,71 @@
- # Installation
-
- gsminstall:
- - -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
- - make $(GSM_INSTALL_TARGETS) ; \
- - fi
- + make $(GSM_INSTALL_TARGETS)
-
- toastinstall:
- - -if [ x"$(TOAST_INSTALL_ROOT)" != x ]; then \
- - make $(TOAST_INSTALL_TARGETS); \
- - fi
- + make $(TOAST_INSTALL_TARGETS)
-
- gsmuninstall:
- - -if [ x"$(GSM_INSTALL_ROOT)" != x ] ; then \
- - rm $(RMFLAGS) $(GSM_INSTALL_TARGETS) ; \
- - fi
- + rm $(RMFLAGS) $(GSM_INSTALL_TARGETS)
-
- toastuninstall:
- - -if [ x"$(TOAST_INSTALL_ROOT)" != x ] ; then \
- - rm $(RMFLAGS) $(TOAST_INSTALL_TARGETS); \
- - fi
- -
- -$(TOAST_INSTALL_BIN)/toast: $(TOAST)
- - -rm $@
- - cp $(TOAST) $@
- - chmod 755 $@
- -
- -$(TOAST_INSTALL_BIN)/untoast: $(TOAST_INSTALL_BIN)/toast
- - -rm $@
- - ln $? $@
- -
- -$(TOAST_INSTALL_BIN)/tcat: $(TOAST_INSTALL_BIN)/toast
- - -rm $@
- - ln $? $@
- -
- -$(TOAST_INSTALL_MAN)/toast.1: $(MAN)/toast.1
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- -
- -$(GSM_INSTALL_MAN)/gsm.3: $(MAN)/gsm.3
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- -
- -$(GSM_INSTALL_MAN)/gsm_option.3: $(MAN)/gsm_option.3
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- -
- -$(GSM_INSTALL_MAN)/gsm_explode.3: $(MAN)/gsm_explode.3
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- -
- -$(GSM_INSTALL_MAN)/gsm_print.3: $(MAN)/gsm_print.3
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- -
- -$(GSM_INSTALL_INC)/gsm.h: $(INC)/gsm.h
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- -
- -$(GSM_INSTALL_LIB)/libgsm.a: $(LIBGSM)
- - -rm $@
- - cp $? $@
- - chmod 444 $@
- + rm $(RMFLAGS) $(TOAST_INSTALL_TARGETS)
- +
- +$(DESTDIR)$(bindir)/toast: $(TOAST)
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(bindir)
- + install -m0755 $(TOAST) $@
- +
- +$(DESTDIR)$(bindir)/untoast: $(DESTDIR)$(bindir)/toast
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(bindir)
- + ln -sf $(TOAST) $@
- +
- +$(DESTDIR)$(bindir)/tcat: $(DESTDIR)$(bindir)/toast
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(bindir)
- + ln -sf $(TOAST) $@
- +
- +$(DESTDIR)$(mandir)/man1/toast.1: $(MAN)/toast.1
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(mandir)/man1/
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(mandir)/man3/gsm.3: $(MAN)/gsm.3
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(mandir)/man3/
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(mandir)/man3/gsm_option.3: $(MAN)/gsm_option.3
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(mandir)/man3/
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(mandir)/man3/gsm_explode.3: $(MAN)/gsm_explode.3
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(mandir)/man3/
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(mandir)/man3/gsm_print.3: $(MAN)/gsm_print.3
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(mandir)/man3/
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(includedir)/gsm/gsm.h: $(INC)/gsm.h
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(includedir)/gsm/
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(libdir)/libgsm.a: $(LIBGSM)
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(libdir)
- + install -m0444 $? $@
- +
- +$(DESTDIR)$(libdir)/libgsm.so: $(LIBGSMSO)
- + -rm $(RMFLAGS) $@
- + -mkdir -p $(DESTDIR)$(libdir)
- + cp -av $?* $(DESTDIR)$(libdir)/
-
-
- # Distribution
|