blob: ae54dda55bbd47b02092fb10dce7e46637948c6f (
plain) (
blame)
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
|
--- Makefile.orig Wed Sep 22 01:48:40 1999
+++ Makefile Tue Feb 22 21:13:18 2000
@@ -1,4 +1,3 @@
-CC = gcc
TARGET = malsync
PLAT := $(shell uname)
@@ -6,9 +5,14 @@
TREETOP = ../../..
-PILOT_LINK_DIR = $(TREETOP)/vendor/pilot/pilot-link.0.9.3
+PILOT_LINK_DIR = $(PREFIX)/pilot
DEFINES = -DMALSYNC
+
+ifeq ($(PLAT),FreeBSD)
+LINKFLAGS = -Wl,--rpath -Wl,$(PILOT_LINK_DIR)/lib
+endif
+
ifeq ($(PLAT),Linux)
DEFINES += -DHAVE_GETOPTLONG
LINKFLAGS = -rdynamic
@@ -21,7 +25,7 @@
endif
-CFLAGS = -Wall -g $(DEFINES) -I$(TREETOP)/mal/common \
+CFLAGS += $(DEFINES) -I$(TREETOP)/mal/common \
-I$(TREETOP)/mal/client/common -I$(PILOT_LINK_DIR)/include -I.
@@ -63,14 +67,13 @@
OBJS = $(SRC:.c=.o)
+all: $(TARGET)
+
$(TARGET): $(OBJS)
- $(CC) $(CFLAGS) -o $@ $(OBJS) -L${PILOT_LINK_DIR}/libsock -lpisock $(LINKLIBS)
+ $(CC) $(CFLAGS) -o $@ $(OBJS) -L${PILOT_LINK_DIR}/lib -lpisock $(LINKLIBS) $(LINKFLAGS)
clean:
rm -f $(OBJS) $(TARGET)
-
-.c.o:
- gcc $(CFLAGS) -c -o $@ $<
|