alaffin | cc2e555 | 2000-07-27 17:13:18 +0000 | [diff] [blame] | 1 | |
subrata_modak | 5c9f1e0 | 2008-04-02 09:24:54 +0000 | [diff] [blame^] | 2 | DESTDIR=/opt/ltp |
| 3 | |
mridge | e6508f8 | 2005-01-04 21:00:17 +0000 | [diff] [blame] | 4 | ifeq ($(shell uname -s),SunOS) |
| 5 | CC=gcc -Wall |
| 6 | endif |
| 7 | CFLAGS+= -I../include |
| 8 | ifeq ($(shell uname -s),Linux) |
| 9 | CFLAGS+= -Wall |
| 10 | endif |
| 11 | ifeq ($(shell uname -s),HP-UX) |
| 12 | CFLAGS+=-Ae -D_LARGEFILE64_SOURCE +DA1.1 |
| 13 | endif |
robbiew | d34d581 | 2005-07-11 22:28:09 +0000 | [diff] [blame] | 14 | CFLAGS+=$(if $(UCLINUX),-DUCLINUX) |
alaffin | cc2e555 | 2000-07-27 17:13:18 +0000 | [diff] [blame] | 15 | LDFLAGS+= |
| 16 | TARGET=libltp.a |
| 17 | SRCS=$(wildcard *.c) |
| 18 | OBJS=$(patsubst %.c,%.o,$(SRCS)) |
| 19 | |
| 20 | $(TARGET): $(OBJS) |
subrata_modak | 5c9f1e0 | 2008-04-02 09:24:54 +0000 | [diff] [blame^] | 21 | $(AR) -cr $@ $^ |
alaffin | cc2e555 | 2000-07-27 17:13:18 +0000 | [diff] [blame] | 22 | |
| 23 | clean: |
| 24 | rm -f $(TARGET) $(OBJS) |
subrata_modak | 5c9f1e0 | 2008-04-02 09:24:54 +0000 | [diff] [blame^] | 25 | |
| 26 | install: $(TARGET) |
| 27 | install -D $(TARGET) $(DESTDIR)/lib/$(TARGET) |
| 28 | install -D ltp.pc /usr/share/pkgconfig/ltp.pc |
| 29 | |