Changeset e7fc2fd in rtems for cpukit/zlib


Ignore:
Timestamp:
Apr 19, 2010, 1:35:55 AM (10 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.11, master
Children:
8198f69
Parents:
89e79667
Message:

Import from zlib-1.2.5

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/zlib/win32/Makefile.gcc

    r89e79667 re7fc2fd  
    2828IMPLIB    = libzdll.a
    2929
     30#
     31# Set to 1 if shared object needs to be installed
     32#
     33SHARED_MODE=0
     34
    3035#LOC = -DASMV
    3136#LOC = -DDEBUG -g
    3237
    33 CC = gcc
     38PREFIX =
     39CC = $(PREFIX)gcc
    3440CFLAGS = $(LOC) -O3 -Wall
     41EXTRA_CFLAGS = -DNO_VIZ
    3542
    3643AS = $(CC)
     
    3845
    3946LD = $(CC)
    40 LDFLAGS = $(LOC) -s
     47LDFLAGS = $(LOC)
    4148
    42 AR = ar
     49AR = $(PREFIX)ar
    4350ARFLAGS = rcs
    4451
    45 RC = windres
     52RC = $(PREFIX)windres
    4653RCFLAGS = --define GCC_WINDRES
    4754
    48 STRIP = strip
     55STRIP = $(PREFIX)strip
    4956
    5057CP = cp -fp
     
    7178
    7279.c.o:
    73         $(CC) $(CFLAGS) -c -o $@ $<
     80        $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
    7481
    7582.S.o:
     
    8289
    8390$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
    84         $(CC) -shared -Wl,--out-implib,$(IMPLIB) \
     91        $(CC) -shared -Wl,--out-implib,$(IMPLIB) $(LDFLAGS) \
    8592        -o $@ win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
    8693        $(STRIP) $@
     
    8895example.exe: example.o $(STATICLIB)
    8996        $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
     97        $(STRIP) $@
    9098
    9199minigzip.exe: minigzip.o $(STATICLIB)
    92100        $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
     101        $(STRIP) $@
    93102
    94103example_d.exe: example.o $(IMPLIB)
    95104        $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
     105        $(STRIP) $@
    96106
    97107minigzip_d.exe: minigzip.o $(IMPLIB)
    98108        $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
     109        $(STRIP) $@
    99110
    100111zlibrc.o: win32/zlib1.rc
     
    102113
    103114
    104 # INCLUDE_PATH and LIBRARY_PATH must be set.
     115# BINARY_PATH, INCLUDE_PATH and LIBRARY_PATH must be set.
    105116
    106117.PHONY: install uninstall clean
    107118
    108 install: zlib.h zconf.h $(LIB)
    109         -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
    110         -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
     119install: zlib.h zconf.h $(STATICLIB) $(IMPLIB)
     120        -@mkdir -p $(INCLUDE_PATH)
     121        -@mkdir -p $(LIBRARY_PATH)
     122        -if [ "$(SHARED_MODE)" = "1" ]; then \
     123                mkdir -p $(BINARY_PATH); \
     124                $(INSTALL) $(SHAREDLIB) $(BINARY_PATH); \
     125                $(INSTALL) $(IMPLIB) $(LIBRARY_PATH); \
     126        fi
    111127        -$(INSTALL) zlib.h $(INCLUDE_PATH)
    112128        -$(INSTALL) zconf.h $(INCLUDE_PATH)
    113129        -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
    114         -$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
    115130
    116131uninstall:
     132        -if [ "$(SHARED_MODE)" = "1" ]; then \
     133                $(RM) $(BINARY_PATH)/$(SHAREDLIB); \
     134                $(RM) $(LIBRARY_PATH)/$(IMPLIB); \
     135        fi
    117136        -$(RM) $(INCLUDE_PATH)/zlib.h
    118137        -$(RM) $(INCLUDE_PATH)/zconf.h
    119138        -$(RM) $(LIBRARY_PATH)/$(STATICLIB)
    120         -$(RM) $(LIBRARY_PATH)/$(IMPLIB)
    121139
    122140clean:
Note: See TracChangeset for help on using the changeset viewer.