summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 38372f509ab056223e8dfc58f015c18d340afb27 (plain)
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

CC ?= gcc
LD ?= gcc

CFLAGS ?= -Werror -Wall -g -DDEBUG
LDFLAGS ?=

ifeq ($(shell uname),Darwin)
HAVE_PROGRAM_INVOCATION_NAME=
else
HAVE_PROGRAM_INVOCATION_NAME=1
endif

ifeq ($(HAVE_PROGRAM_INVOCATION_NAME),1)
CFLAGS += -DHAVE_PROGRAM_INVOCATION_NAME
endif

aports-cache-objs := aports-cache.o

%.o: %.c
	$(CC) $(CFLAGS) $(CFLAGS_$(notdir $@)) -c -o $@ $<

aports-cache: aports-cache.o main.o
	$(CC) $(LDFLAGS) -o $@ $(LIBS_$(notdir $@)) $^

clean:
	rm -f *.o aports-cache