* device/lib/pic16/Makefile.common.in: added $(MM) to fix `make clean`
[fw/sdcc] / support / librarian / Makefile
1 PRJDIR          = ../..
2
3 include $(PRJDIR)/Makefile.common
4
5 CFLAGS          += -Wall
6
7 OBJECTS         = sdcclib.o
8
9 SOURCES         = $(patsubst %.o,%.c,$(OBJECTS))
10
11 TARGET          = $(PRJDIR)/bin/sdcclib$(EXEEXT)
12
13 all: $(TARGET)
14
15 install: all installdirs
16         $(INSTALL) $(TARGET) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
17         $(STRIP) `echo $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)|sed '$(transform)'`
18
19 # Deleting all the installed files
20 # --------------------------------
21 uninstall:
22         rm -f $(DESTDIR)$(bindir)/sdcclib$(EXEEXT)
23
24 # Performing self-test
25 # --------------------
26 check:
27
28
29 # Performing installation test
30 # ----------------------------
31 installcheck:
32
33
34 # Creating installation directories
35 # ---------------------------------
36 installdirs:
37         $(INSTALL) -d $(DESTDIR)$(bindir)
38
39
40 # Creating dependencies
41 # ---------------------
42 dep:
43
44 $(TARGET): $(OBJECTS)
45         $(CC) $(LDFLAGS) -o $@ $(OBJECTS)
46
47 .c.o:
48         $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
49
50
51 checkconf:
52
53 include clean.mk