20 lines
246 B
Makefile
20 lines
246 B
Makefile
|
CC = gcc
|
||
|
CX = g++
|
||
|
LD = ld
|
||
|
CFLAGS = -c -Os -fPIC
|
||
|
|
||
|
OBJS = main.o
|
||
|
SLIB = graph.so
|
||
|
|
||
|
all: $(SLIB)
|
||
|
|
||
|
$(SLIB): $(OBJS)
|
||
|
$(CX) -shared $(OBJS) -o $(SLIB)
|
||
|
%.o: %.c
|
||
|
$(CC) $(CFLAGS) $< -o $@
|
||
|
%.o: %.cpp
|
||
|
$(CX) $(CFLAGS) $< -o $@
|
||
|
|
||
|
clean:
|
||
|
rm -f $(OBJS) *.png
|