summaryrefslogtreecommitdiff
path: root/Makefile
blob: 9f1c4429ee8efb83663096afa484dc50b1ed3f87 (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
PROJECT=rusb
CC=gcc
CFLAGS=
INCLUDE=-I./include 
LDFLAGS=
LDFLAGS_LIB=

CC=gcc
AR=ar
SOURCES=
SRC_LIB=
OBJ_LIB=
SRC_OS=
OBJ_OS=

BUILD_DIR=build/

include src/make.mk

SOURCES+=$(wildcard src/*.c)
SOURCES+=$(wildcard src/os/*.c)
OBJECTS_=$(addprefix $(BUILD_DIR),$(SOURCES))
OBJECTS=$(OBJECTS_:.c=.o)

#%.o: %.c
#	echo "Main"
#	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $(BUILD_DIR)$@

all: build-src
	echo "end"
	#echo $(SOURCES)
	#echo $(OBJECTS)
	$(CC) -shared -Wl,-soname,lib$(PROJECT).so -o lib$(PROJECT).so $(OBJECTS) $(LDFLAGS_LIB) 
	$(AR) rcv lib$(PROJECT).a $(OBJECTS)


clean:
	rm -rfv $(BUILD_DIR)/src/*.o
	rm -rfv $(BUILD_DIR)/src/os/*.o