Linker flags and makefile cleanup
This commit is contained in:
parent
a5c5ecd64b
commit
2886a81574
1 changed files with 4 additions and 5 deletions
9
Makefile
9
Makefile
|
@ -14,10 +14,9 @@ CFLAGS += -fshort-enums
|
|||
else
|
||||
CFLAGS += -g -O0 -std=c99 -march=native -mtune=native
|
||||
CFLAGS += -DDEBUG
|
||||
endif
|
||||
endif # DEBUG
|
||||
|
||||
# Include debug flags
|
||||
CFLAGS += -g -O0 -std=c99 -march=native -mtune=native
|
||||
LDFLAGS = -lm
|
||||
|
||||
C_SOURCES = $(wildcard *.c)
|
||||
C_HEADERS = $(wildcard *.h)
|
||||
|
@ -35,7 +34,7 @@ all: $(OBJECTS)
|
|||
@$(CC) $(CFLAGS) -S -masm=intel $<
|
||||
|
||||
driver: $(OBJECTS)
|
||||
@$(CC) $(CFLAGS) $^ -o $@
|
||||
@$(CC) $(LDFLAGS) $^ -o $@
|
||||
|
||||
run: driver
|
||||
@./driver
|
||||
|
@ -44,7 +43,7 @@ lib: $(OBJECTS)
|
|||
@ar rcs librbuf.a ringbuf.o
|
||||
|
||||
dylib: $(OBJECTS)
|
||||
@$(CC) $(CFLAGS) -fPIC -shared -o librbuf.so ringbuf.o
|
||||
@$(CC) $(LDLAGS) -fPIC -shared -o librbuf.so ringbuf.o
|
||||
|
||||
install:
|
||||
@cp librbuf.a /usr/local/lib
|
||||
|
|
Loading…
Reference in a new issue